diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 22:23:48 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 22:23:48 +0000 |
commit | a2da49a5570cef35c57acd35f842cb3f368619a1 (patch) | |
tree | 19a3e3c869765668949e9e9cb1041c9309e2c685 /chrome/browser/printing | |
parent | 9a11fde9886808967843fce8ee7e07d250025b06 (diff) | |
download | chromium_src-a2da49a5570cef35c57acd35f842cb3f368619a1.zip chromium_src-a2da49a5570cef35c57acd35f842cb3f368619a1.tar.gz chromium_src-a2da49a5570cef35c57acd35f842cb3f368619a1.tar.bz2 |
Disable printing context menus on the print preview page.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5320001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing')
-rw-r--r-- | chrome/browser/printing/print_preview_tab_controller.cc | 6 | ||||
-rw-r--r-- | chrome/browser/printing/print_preview_tab_controller.h | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc index 6888f5b..2cc8514 100644 --- a/chrome/browser/printing/print_preview_tab_controller.cc +++ b/chrome/browser/printing/print_preview_tab_controller.cc @@ -35,9 +35,6 @@ TabContents* PrintPreviewTabController::GetOrCreatePreviewTab( 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) { @@ -48,6 +45,7 @@ TabContents* PrintPreviewTabController::GetOrCreatePreviewTab( return CreatePrintPreviewTab(initiator_tab, browser_window_id); } +// static bool PrintPreviewTabController::IsPrintPreviewTab(TabContents* tab) { const GURL& url = tab->GetURL(); return (url.SchemeIs(chrome::kChromeUIScheme) && @@ -192,4 +190,4 @@ void PrintPreviewTabController::Observe(NotificationType type, RemoveObservers(initiator_tab); } -} // namespace printing +} // namespace printing diff --git a/chrome/browser/printing/print_preview_tab_controller.h b/chrome/browser/printing/print_preview_tab_controller.h index 6eec3f4..5be6118 100644 --- a/chrome/browser/printing/print_preview_tab_controller.h +++ b/chrome/browser/printing/print_preview_tab_controller.h @@ -43,12 +43,12 @@ class PrintPreviewTabController const NotificationSource& source, const NotificationDetails& details); + // Returns true if |tab| is a print preview tab. + static bool IsPrintPreviewTab(TabContents* tab); + private: friend class base::RefCounted<PrintPreviewTabController>; - // Returns true if |tab| is a print preview tab. - bool IsPrintPreviewTab(TabContents* tab); - // Returns initiator tab for |preview_tab|. // Returns NULL if no initiator tab exists for |preview_tab|. TabContents* GetInitiatorTab(TabContents* preview_tab); |