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

Unified Diff: chrome/browser/printing/print_preview_dialog_controller.h

Issue 17500003: Close web contents modal dialogs on content load start (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't observe nav committed for initiator tab Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/printing/print_preview_dialog_controller.h
diff --git a/chrome/browser/printing/print_preview_dialog_controller.h b/chrome/browser/printing/print_preview_dialog_controller.h
index 0ce70db172da1131dd2aff6e6b80627a5ecf8b86..0c8520f37aadffeee980a58253c5cb627b8b6d07 100644
--- a/chrome/browser/printing/print_preview_dialog_controller.h
+++ b/chrome/browser/printing/print_preview_dialog_controller.h
@@ -76,6 +76,13 @@ class PrintPreviewDialogController
private:
friend class base::RefCounted<PrintPreviewDialogController>;
+ // Used to distinguish between the two varieties of WebContents dealt with by
+ // this class.
+ enum TabType {
Lei Zhang 2013/06/27 21:36:18 nit: the preview is not actually a tab, so PREVIEW
Mike Wittman 2013/06/27 23:39:38 Done. With the web contents modal dialog work, th
+ INITIATOR_TAB,
+ PREVIEW_TAB
+ };
+
// 1:1 relationship between a print preview dialog and its initiator tab.
// Key: Print preview dialog.
// Value: Initiator tab.
@@ -106,8 +113,8 @@ class PrintPreviewDialogController
void SaveInitiatorTabTitle(content::WebContents* preview_dialog);
// Adds/Removes observers for notifications from |contents|.
- void AddObservers(content::WebContents* contents);
- void RemoveObservers(content::WebContents* contents);
+ void AddObservers(content::WebContents* contents, TabType tab_type);
+ void RemoveObservers(content::WebContents* contents, TabType tab_type);
// Removes WebContents when they close/crash/navigate.
void RemoveInitiatorTab(content::WebContents* initiator_tab);

Powered by Google App Engine
This is Rietveld 408576698