Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 6966023: Pull platform_util dependency from TC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 bool Browser::SupportsWindowFeature(WindowFeature feature) const { 1695 bool Browser::SupportsWindowFeature(WindowFeature feature) const {
1696 return SupportsWindowFeatureImpl(feature, true); 1696 return SupportsWindowFeatureImpl(feature, true);
1697 } 1697 }
1698 1698
1699 bool Browser::CanSupportWindowFeature(WindowFeature feature) const { 1699 bool Browser::CanSupportWindowFeature(WindowFeature feature) const {
1700 return SupportsWindowFeatureImpl(feature, false); 1700 return SupportsWindowFeatureImpl(feature, false);
1701 } 1701 }
1702 1702
1703 void Browser::EmailPageLocation() { 1703 void Browser::EmailPageLocation() {
1704 UserMetrics::RecordAction(UserMetricsAction("EmailPageLocation")); 1704 UserMetrics::RecordAction(UserMetricsAction("EmailPageLocation"));
1705 GetSelectedTabContents()->EmailPageLocation(); 1705 TabContents* tc = GetSelectedTabContents();
1706 if (!tc)
1707 return;
1708
1709 std::string title = EscapeQueryParamValue(UTF16ToUTF8(tc->GetTitle()), false);
1710 std::string page_url = EscapeQueryParamValue(tc->GetURL().spec(), false);
1711 std::string mailto = std::string("mailto:?subject=Fwd:%20") +
1712 title + "&body=%0A%0A" + page_url;
1713 platform_util::OpenExternal(GURL(mailto));
1706 } 1714 }
1707 1715
1708 void Browser::Print() { 1716 void Browser::Print() {
1709 if (switches::IsPrintPreviewEnabled()) { 1717 if (switches::IsPrintPreviewEnabled()) {
1710 printing::PrintPreviewTabController::PrintPreview( 1718 printing::PrintPreviewTabController::PrintPreview(
1711 GetSelectedTabContents()); 1719 GetSelectedTabContents());
1712 } else { 1720 } else {
1713 GetSelectedTabContentsWrapper()->print_view_manager()->PrintNow(); 1721 GetSelectedTabContentsWrapper()->print_view_manager()->PrintNow();
1714 } 1722 }
1715 } 1723 }
(...skipping 2921 matching lines...) Expand 10 before | Expand all | Expand 10 after
4637 TabContents* current_tab = GetSelectedTabContents(); 4645 TabContents* current_tab = GetSelectedTabContents();
4638 if (current_tab) { 4646 if (current_tab) {
4639 content_restrictions = current_tab->content_restrictions(); 4647 content_restrictions = current_tab->content_restrictions();
4640 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); 4648 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
4641 // See comment in UpdateCommandsForTabState about why we call url(). 4649 // See comment in UpdateCommandsForTabState about why we call url().
4642 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) 4650 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL()))
4643 content_restrictions |= CONTENT_RESTRICTION_SAVE; 4651 content_restrictions |= CONTENT_RESTRICTION_SAVE;
4644 } 4652 }
4645 return content_restrictions; 4653 return content_restrictions;
4646 } 4654 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698