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

Side by Side Diff: chrome/browser/printing/print_preview_tab_controller.h

Issue 5320001: Disable printing context menus on the print preview page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix test in a less hacky manner 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_ 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 25 matching lines...) Expand all
36 // Get/Create the print preview tab for |initiator_tab|. 36 // Get/Create the print preview tab for |initiator_tab|.
37 // |browser_window_id| is the browser window containing |initiator_tab|. 37 // |browser_window_id| is the browser window containing |initiator_tab|.
38 TabContents* GetOrCreatePreviewTab( 38 TabContents* GetOrCreatePreviewTab(
39 TabContents* initiator_tab, int browser_window_id); 39 TabContents* initiator_tab, int browser_window_id);
40 40
41 // Notification observer implementation. 41 // Notification observer implementation.
42 virtual void Observe(NotificationType type, 42 virtual void Observe(NotificationType type,
43 const NotificationSource& source, 43 const NotificationSource& source,
44 const NotificationDetails& details); 44 const NotificationDetails& details);
45 45
46 // Returns true if |tab| is a print preview tab.
47 static bool IsPrintPreviewTab(TabContents* tab);
48
46 private: 49 private:
47 friend class base::RefCounted<PrintPreviewTabController>; 50 friend class base::RefCounted<PrintPreviewTabController>;
48 51
49 // Returns true if |tab| is a print preview tab.
50 bool IsPrintPreviewTab(TabContents* tab);
51
52 // Returns initiator tab for |preview_tab|. 52 // Returns initiator tab for |preview_tab|.
53 // Returns NULL if no initiator tab exists for |preview_tab|. 53 // Returns NULL if no initiator tab exists for |preview_tab|.
54 TabContents* GetInitiatorTab(TabContents* preview_tab); 54 TabContents* GetInitiatorTab(TabContents* preview_tab);
55 55
56 // Returns preview tab for |tab|. 56 // Returns preview tab for |tab|.
57 // Returns |tab| if |tab| is a preview tab. 57 // Returns |tab| if |tab| is a preview tab.
58 // Returns NULL if no preview tab exists for |tab|. 58 // Returns NULL if no preview tab exists for |tab|.
59 TabContents* GetPrintPreviewForTab(TabContents* tab); 59 TabContents* GetPrintPreviewForTab(TabContents* tab);
60 60
61 // Creates a new print preview tab. 61 // Creates a new print preview tab.
(...skipping 16 matching lines...) Expand all
78 // True if the controller is waiting for a new preview tab via 78 // True if the controller is waiting for a new preview tab via
79 // NavigationType::NEW_PAGE. 79 // NavigationType::NEW_PAGE.
80 bool waiting_for_new_preview_page_; 80 bool waiting_for_new_preview_page_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(PrintPreviewTabController); 82 DISALLOW_COPY_AND_ASSIGN(PrintPreviewTabController);
83 }; 83 };
84 84
85 } // namespace printing 85 } // namespace printing
86 86
87 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_ 87 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/print_preview_ui_uitest.cc ('k') | chrome/browser/printing/print_preview_tab_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698