summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing/print_preview_tab_controller.h
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-10 20:40:28 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-10 20:40:28 +0000
commit810f807eb6136de803bd7204d50b34f271f171d9 (patch)
tree895f4d8751a5c93f1568a95ae51f8a1b66ce38a5 /chrome/browser/printing/print_preview_tab_controller.h
parente484b4ec2b99863f79a3175849322ab0c7d77229 (diff)
downloadchromium_src-810f807eb6136de803bd7204d50b34f271f171d9.zip
chromium_src-810f807eb6136de803bd7204d50b34f271f171d9.tar.gz
chromium_src-810f807eb6136de803bd7204d50b34f271f171d9.tar.bz2
C++ readability change for kmadhusu.
BUG=none TEST=none Review URL: http://codereview.chromium.org/5054003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68883 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing/print_preview_tab_controller.h')
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/chrome/browser/printing/print_preview_tab_controller.h b/chrome/browser/printing/print_preview_tab_controller.h
index 5be6118..a3d01ea 100644
--- a/chrome/browser/printing/print_preview_tab_controller.h
+++ b/chrome/browser/printing/print_preview_tab_controller.h
@@ -2,7 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// For print preview, a print preview (PP) tab is linked with the initiator tab
+// that initiated the printing operation. If the tab initiates a second
+// printing operation while the first print preview tab is still open, that PP
+// tab is focused/activated. There may be more than one PP tab open. There is a
+// 1:1 relationship between PP tabs and initiating tabs. This class manages PP
+// tabs and initiator tabs.
#ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_
+
#define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_
#pragma once
@@ -17,22 +24,16 @@ class TabContents;
namespace printing {
-// For print preview, a print preview (PP) tab is linked with the initiator tab
-// that initiated the printing operation. If the tab initiates a second
-// printing operation while the first print preview tab is still open, that PP
-// tab is focused/activated. There may be more than one PP tab open. There is a
-// 1:1 relationship between PP tabs and initiating tabs. This class manages PP
-// tabs and initiator tabs.
class PrintPreviewTabController
- : public base::RefCounted<PrintPreviewTabController>,
- public NotificationObserver {
+ : public base::RefCounted<PrintPreviewTabController>,
+ public NotificationObserver {
public:
- static PrintPreviewTabController* GetInstance();
-
PrintPreviewTabController();
virtual ~PrintPreviewTabController();
+ static PrintPreviewTabController* GetInstance();
+
// Get/Create the print preview tab for |initiator_tab|.
// |browser_window_id| is the browser window containing |initiator_tab|.
TabContents* GetOrCreatePreviewTab(
@@ -49,6 +50,11 @@ class PrintPreviewTabController
private:
friend class base::RefCounted<PrintPreviewTabController>;
+ // 1:1 relationship between initiator tab and print preview tab.
+ // Key: Preview tab.
+ // Value: Initiator tab.
+ typedef std::map<TabContents*, TabContents*> PrintPreviewTabMap;
+
// Returns initiator tab for |preview_tab|.
// Returns NULL if no initiator tab exists for |preview_tab|.
TabContents* GetInitiatorTab(TabContents* preview_tab);
@@ -66,10 +72,6 @@ class PrintPreviewTabController
void AddObservers(TabContents* tab);
void RemoveObservers(TabContents* tab);
- // 1:1 relationship between initiator tab and print preview tab.
- // Key: Preview tab.
- // Value: Initiator tab.
- typedef std::map<TabContents*, TabContents*> PrintPreviewTabMap;
PrintPreviewTabMap preview_tab_map_;
// A registrar for listening notifications.