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

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

Issue 8136027: Print Preview: Make print preview tab modal. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 9 years, 1 month 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 // For print preview, a print preview (PP) tab is linked with the initiator tab 5 // For print preview, a print preview (PP) tab is linked with the initiator tab
6 // that initiated the printing operation. If the tab initiates a second 6 // that initiated the printing operation. If the tab initiates a second
7 // printing operation while the first print preview tab is still open, that PP 7 // printing operation while the first print preview tab is still open, that PP
8 // tab is focused/activated. There may be more than one PP tab open. There is a 8 // tab is focused/activated. There may be more than one PP tab open. There is a
9 // 1:1 relationship between PP tabs and initiating tabs. This class manages PP 9 // 1:1 relationship between PP tabs and initiating tabs. This class manages PP
10 // tabs and initiator tabs. 10 // tabs and initiator tabs.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 TabContentsWrapper* CreatePrintPreviewTab(TabContentsWrapper* initiator_tab); 97 TabContentsWrapper* CreatePrintPreviewTab(TabContentsWrapper* initiator_tab);
98 98
99 // Helper function to store the initiator tab(title and url) information 99 // Helper function to store the initiator tab(title and url) information
100 // in PrintPreviewUI. 100 // in PrintPreviewUI.
101 void SetInitiatorTabURLAndTitle(TabContentsWrapper* preview_tab); 101 void SetInitiatorTabURLAndTitle(TabContentsWrapper* preview_tab);
102 102
103 // Adds/Removes observers for notifications from |tab|. 103 // Adds/Removes observers for notifications from |tab|.
104 void AddObservers(TabContentsWrapper* tab); 104 void AddObservers(TabContentsWrapper* tab);
105 void RemoveObservers(TabContentsWrapper* tab); 105 void RemoveObservers(TabContentsWrapper* tab);
106 106
107 // Removes tabs when they close/crash/navigate.
108 void RemoveInitiatorTab(TabContentsWrapper* initiator_tab);
109 void RemovePreviewTab(TabContentsWrapper* preview_tab);
110
107 // Mapping between print preview tab and the corresponding initiator tab. 111 // Mapping between print preview tab and the corresponding initiator tab.
108 PrintPreviewTabMap preview_tab_map_; 112 PrintPreviewTabMap preview_tab_map_;
109 113
110 // A registrar for listening notifications. 114 // A registrar for listening notifications.
111 content::NotificationRegistrar registrar_; 115 content::NotificationRegistrar registrar_;
112 116
113 // True if the controller is waiting for a new preview tab via 117 // True if the controller is waiting for a new preview tab via
114 // content::NAVIGATION_TYPE_NEW_PAGE. 118 // content::NAVIGATION_TYPE_NEW_PAGE.
115 bool waiting_for_new_preview_page_; 119 bool waiting_for_new_preview_page_;
116 120
117 DISALLOW_COPY_AND_ASSIGN(PrintPreviewTabController); 121 DISALLOW_COPY_AND_ASSIGN(PrintPreviewTabController);
118 }; 122 };
119 123
120 } // namespace printing 124 } // namespace printing
121 125
122 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_ 126 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_preview_message_handler.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