diff options
author | wittman@chromium.org <wittman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-02 00:47:05 +0000 |
---|---|---|
committer | wittman@chromium.org <wittman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-02 00:47:05 +0000 |
commit | e6c97f6de21efd3e693a1afda435cc3b9a9eb2c7 (patch) | |
tree | e2b1f4bd8b21d7e18b77e35bf620545dd6e0043f /chrome/browser/printing/print_preview_dialog_controller.h | |
parent | 0b2294d3a81593001801e3bfa14485806b5fade8 (diff) | |
download | chromium_src-e6c97f6de21efd3e693a1afda435cc3b9a9eb2c7.zip chromium_src-e6c97f6de21efd3e693a1afda435cc3b9a9eb2c7.tar.gz chromium_src-e6c97f6de21efd3e693a1afda435cc3b9a9eb2c7.tar.bz2 |
Cleanup: remove "tab" terminology from print preview code
With recent changes to web contents modal dialog management, the print
preview may be hosted on WebContents that are not browser tabs. Update
the names and comments to reflect this. This change was extracted from
r212329 which was reverted.
No functional difference is intended with this change.
Review URL: https://chromiumcodereview.appspot.com/21617002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing/print_preview_dialog_controller.h')
-rw-r--r-- | chrome/browser/printing/print_preview_dialog_controller.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/chrome/browser/printing/print_preview_dialog_controller.h b/chrome/browser/printing/print_preview_dialog_controller.h index 0ce70db..98b2ec8 100644 --- a/chrome/browser/printing/print_preview_dialog_controller.h +++ b/chrome/browser/printing/print_preview_dialog_controller.h @@ -22,9 +22,9 @@ class WebContents; namespace printing { -// For print preview, the tab that initiates the printing operation is the -// initiator tab, and the constrained dialog that shows the print preview is -// the print preview dialog. +// For print preview, the WebContents that initiates the printing operation is +// the initiator, and the constrained dialog that shows the print preview is the +// print preview dialog. // This class manages print preview dialog creation and destruction, and keeps // track of the 1:1 relationship between initiatora tabs and print preview // dialogs. @@ -36,14 +36,14 @@ class PrintPreviewDialogController static PrintPreviewDialogController* GetInstance(); - // Initiate print preview for |initiator_tab|. + // Initiate print preview for |initiator|. // Call this instead of GetOrCreatePreviewDialog(). - static void PrintPreview(content::WebContents* initiator_tab); + static void PrintPreview(content::WebContents* initiator); - // Get/Create the print preview dialog for |initiator_tab|. + // Get/Create the print preview dialog for |initiator|. // Exposed for unit tests. content::WebContents* GetOrCreatePreviewDialog( - content::WebContents* initiator_tab); + content::WebContents* initiator); // Returns the preview dialog for |contents|. // Returns |contents| if |contents| is a preview dialog. @@ -51,9 +51,9 @@ class PrintPreviewDialogController content::WebContents* GetPrintPreviewForContents( content::WebContents* contents) const; - // Returns the initiator tab for |preview_dialog|. - // Returns NULL if no initiator tab exists for |preview_dialog|. - content::WebContents* GetInitiatorTab(content::WebContents* preview_dialog); + // Returns the initiator for |preview_dialog|. + // Returns NULL if no initiator exists for |preview_dialog|. + content::WebContents* GetInitiator(content::WebContents* preview_dialog); // content::NotificationObserver implementation. virtual void Observe(int type, @@ -66,8 +66,8 @@ class PrintPreviewDialogController // Returns true if |url| is a print preview url. static bool IsPrintPreviewURL(const GURL& url); - // Erase the initiator tab info associated with |preview_tab|. - void EraseInitiatorTabInfo(content::WebContents* preview_tab); + // Erase the initiator info associated with |preview_dialog|. + void EraseInitiatorInfo(content::WebContents* preview_dialog); bool is_creating_print_preview_dialog() const { return is_creating_print_preview_dialog_; @@ -78,7 +78,7 @@ class PrintPreviewDialogController // 1:1 relationship between a print preview dialog and its initiator tab. // Key: Print preview dialog. - // Value: Initiator tab. + // Value: Initiator. typedef std::map<content::WebContents*, content::WebContents*> PrintPreviewDialogMap; @@ -99,21 +99,21 @@ class PrintPreviewDialogController // Creates a new print preview dialog. content::WebContents* CreatePrintPreviewDialog( - content::WebContents* initiator_tab); + content::WebContents* initiator); - // Helper function to store the title of the initiator tab associated with + // Helper function to store the title of the initiator associated with // |preview_dialog| in |preview_dialog|'s PrintPreviewUI. - void SaveInitiatorTabTitle(content::WebContents* preview_dialog); + void SaveInitiatorTitle(content::WebContents* preview_dialog); // Adds/Removes observers for notifications from |contents|. void AddObservers(content::WebContents* contents); void RemoveObservers(content::WebContents* contents); // Removes WebContents when they close/crash/navigate. - void RemoveInitiatorTab(content::WebContents* initiator_tab); + void RemoveInitiator(content::WebContents* initiator); void RemovePreviewDialog(content::WebContents* preview_dialog); - // Mapping between print preview dialog and the corresponding initiator tab. + // Mapping between print preview dialog and the corresponding initiator. PrintPreviewDialogMap preview_dialog_map_; // A registrar for listening notifications. |