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

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

Issue 7202012: Print Preview: Display a throbber when the user requests the system print (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years, 6 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
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 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 std::string page_url = EscapeQueryParamValue(tc->GetURL().spec(), false); 1723 std::string page_url = EscapeQueryParamValue(tc->GetURL().spec(), false);
1724 std::string mailto = std::string("mailto:?subject=Fwd:%20") + 1724 std::string mailto = std::string("mailto:?subject=Fwd:%20") +
1725 title + "&body=%0A%0A" + page_url; 1725 title + "&body=%0A%0A" + page_url;
1726 platform_util::OpenExternal(GURL(mailto)); 1726 platform_util::OpenExternal(GURL(mailto));
1727 } 1727 }
1728 1728
1729 void Browser::Print() { 1729 void Browser::Print() {
1730 if (switches::IsPrintPreviewEnabled()) 1730 if (switches::IsPrintPreviewEnabled())
1731 GetSelectedTabContentsWrapper()->print_view_manager()->PrintPreviewNow(); 1731 GetSelectedTabContentsWrapper()->print_view_manager()->PrintPreviewNow();
1732 else 1732 else
1733 GetSelectedTabContentsWrapper()->print_view_manager()->PrintNow(); 1733 GetSelectedTabContentsWrapper()->print_view_manager()->PrintNow(NULL);
1734 } 1734 }
1735 1735
1736 void Browser::ToggleEncodingAutoDetect() { 1736 void Browser::ToggleEncodingAutoDetect() {
1737 UserMetrics::RecordAction(UserMetricsAction("AutoDetectChange")); 1737 UserMetrics::RecordAction(UserMetricsAction("AutoDetectChange"));
1738 encoding_auto_detect_.SetValue(!encoding_auto_detect_.GetValue()); 1738 encoding_auto_detect_.SetValue(!encoding_auto_detect_.GetValue());
1739 // If "auto detect" is turned on, then any current override encoding 1739 // If "auto detect" is turned on, then any current override encoding
1740 // is cleared. This also implicitly performs a reload. 1740 // is cleared. This also implicitly performs a reload.
1741 // OTOH, if "auto detect" is turned off, we don't change the currently 1741 // OTOH, if "auto detect" is turned off, we don't change the currently
1742 // active encoding. 1742 // active encoding.
1743 if (encoding_auto_detect_.GetValue()) { 1743 if (encoding_auto_detect_.GetValue()) {
(...skipping 2954 matching lines...) Expand 10 before | Expand all | Expand 10 after
4698 TabContents* current_tab = GetSelectedTabContents(); 4698 TabContents* current_tab = GetSelectedTabContents();
4699 if (current_tab) { 4699 if (current_tab) {
4700 content_restrictions = current_tab->content_restrictions(); 4700 content_restrictions = current_tab->content_restrictions();
4701 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); 4701 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
4702 // See comment in UpdateCommandsForTabState about why we call url(). 4702 // See comment in UpdateCommandsForTabState about why we call url().
4703 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) 4703 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL()))
4704 content_restrictions |= CONTENT_RESTRICTION_SAVE; 4704 content_restrictions |= CONTENT_RESTRICTION_SAVE;
4705 } 4705 }
4706 return content_restrictions; 4706 return content_restrictions;
4707 } 4707 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698