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

Unified Diff: chrome/browser/printing/print_preview_tab_controller.cc

Issue 5529004: Revert 68228 - Disable printing context menus on the print preview page.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/printing/print_preview_tab_controller.h ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_tab_controller.cc
===================================================================
--- chrome/browser/printing/print_preview_tab_controller.cc (revision 68243)
+++ chrome/browser/printing/print_preview_tab_controller.cc (working copy)
@@ -35,6 +35,9 @@
TabContents* initiator_tab, int browser_window_id ) {
DCHECK(initiator_tab);
+ if (IsPrintPreviewTab(initiator_tab))
+ return initiator_tab;
+
// Get the print preview tab for |initiator_tab|.
TabContents* preview_tab = GetPrintPreviewForTab(initiator_tab);
if (preview_tab) {
@@ -45,7 +48,6 @@
return CreatePrintPreviewTab(initiator_tab, browser_window_id);
}
-// static
bool PrintPreviewTabController::IsPrintPreviewTab(TabContents* tab) {
const GURL& url = tab->GetURL();
return (url.SchemeIs(chrome::kChromeUIScheme) &&
@@ -190,4 +192,4 @@
RemoveObservers(initiator_tab);
}
-} // namespace printing
+} // namespace printing
« no previous file with comments | « chrome/browser/printing/print_preview_tab_controller.h ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698