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

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

Issue 7056070: PrintPreview: Preview generation should not block print button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 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 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 TabContents* GetInitiatorTab(TabContents* preview_tab); 53 TabContents* GetInitiatorTab(TabContents* preview_tab);
54 54
55 // Notification observer implementation. 55 // Notification observer implementation.
56 virtual void Observe(NotificationType type, 56 virtual void Observe(NotificationType type,
57 const NotificationSource& source, 57 const NotificationSource& source,
58 const NotificationDetails& details); 58 const NotificationDetails& details);
59 59
60 // Returns true if |tab| is a print preview tab. 60 // Returns true if |tab| is a print preview tab.
61 static bool IsPrintPreviewTab(TabContents* tab); 61 static bool IsPrintPreviewTab(TabContents* tab);
62 62
63 // Erase the initiator tab info associated with |preview_tab|.
64 void EraseInitiatorTabInfo(TabContents* preview_tab);
65
63 private: 66 private:
64 friend class base::RefCounted<PrintPreviewTabController>; 67 friend class base::RefCounted<PrintPreviewTabController>;
65 68
66 // 1:1 relationship between initiator tab and print preview tab. 69 // 1:1 relationship between initiator tab and print preview tab.
67 // Key: Preview tab. 70 // Key: Preview tab.
68 // Value: Initiator tab. 71 // Value: Initiator tab.
69 typedef std::map<TabContents*, TabContents*> PrintPreviewTabMap; 72 typedef std::map<TabContents*, TabContents*> PrintPreviewTabMap;
70 73
71 // Creates a new print preview tab. 74 // Creates a new print preview tab.
72 TabContents* CreatePrintPreviewTab(TabContents* initiator_tab); 75 TabContents* CreatePrintPreviewTab(TabContents* initiator_tab);
(...skipping 10 matching lines...) Expand all
83 // True if the controller is waiting for a new preview tab via 86 // True if the controller is waiting for a new preview tab via
84 // NavigationType::NEW_PAGE. 87 // NavigationType::NEW_PAGE.
85 bool waiting_for_new_preview_page_; 88 bool waiting_for_new_preview_page_;
86 89
87 DISALLOW_COPY_AND_ASSIGN(PrintPreviewTabController); 90 DISALLOW_COPY_AND_ASSIGN(PrintPreviewTabController);
88 }; 91 };
89 92
90 } // namespace printing 93 } // namespace printing
91 94
92 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_TAB_CONTROLLER_H_ 95 #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