Commit d221a39d authored by avi@chromium.org's avatar avi@chromium.org

Pull platform_util dependency from TC.

BUG=71097
TEST="email link" works

Review URL: http://codereview.chromium.org/6966023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86423 0039d316-1c4b-4281-b951-d872f2087c98
parent 7505bca3
......@@ -1702,7 +1702,14 @@ bool Browser::CanSupportWindowFeature(WindowFeature feature) const {
void Browser::EmailPageLocation() {
UserMetrics::RecordAction(UserMetricsAction("EmailPageLocation"));
GetSelectedTabContents()->EmailPageLocation();
TabContents* tc = GetSelectedTabContents();
DCHECK(tc);
std::string title = EscapeQueryParamValue(UTF16ToUTF8(tc->GetTitle()), false);
std::string page_url = EscapeQueryParamValue(tc->GetURL().spec(), false);
std::string mailto = std::string("mailto:?subject=Fwd:%20") +
title + "&body=%0A%0A" + page_url;
platform_util::OpenExternal(GURL(mailto));
}
void Browser::Print() {
......
......@@ -28,7 +28,6 @@
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/common/chrome_paths.h"
......
......@@ -22,7 +22,6 @@
#include "chrome/browser/load_notification_details.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_host/web_cache_manager.h"
......@@ -762,14 +761,6 @@ void TabContents::WillClose(ConstrainedWindow* window) {
}
}
void TabContents::EmailPageLocation() {
std::string title = EscapeQueryParamValue(UTF16ToUTF8(GetTitle()), false);
std::string page_url = EscapeQueryParamValue(GetURL().spec(), false);
std::string mailto = std::string("mailto:?subject=Fwd:%20") +
title + "&body=%0A%0A" + page_url;
platform_util::OpenExternal(GURL(mailto));
}
bool TabContents::IsActiveEntry(int32 page_id) {
NavigationEntry* active_entry = controller_.GetActiveEntry();
return (active_entry != NULL &&
......
......@@ -396,10 +396,6 @@ class TabContents : public PageNavigator,
suppress_javascript_messages_ = suppress_javascript_messages;
}
// Tells the user's email client to open a compose window containing the
// current page's URL.
void EmailPageLocation();
// Returns true if the active NavigationEntry's page_id equals page_id.
bool IsActiveEntry(int32 page_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment