Chromium Code Reviews| Index: chrome/browser/printing/background_printing_manager.h |
| diff --git a/chrome/browser/printing/background_printing_manager.h b/chrome/browser/printing/background_printing_manager.h |
| index 4d935fa89d8266f91f85ac831706618c7c5ac365..a4e37c8cd2436bff0a06717b6fe525c0e3b8c469 100644 |
| --- a/chrome/browser/printing/background_printing_manager.h |
| +++ b/chrome/browser/printing/background_printing_manager.h |
| @@ -30,7 +30,18 @@ class BackgroundPrintingManager |
| // Takes ownership of |content| and deletes it when |content| finishes |
| // printing. This removes the TabContentsWrapper from its TabStrip and |
| // hides it from the user. |
| - void OwnTabContents(TabContentsWrapper* content); |
| + void OwnPreviewTabContents(TabContentsWrapper* content); |
| + |
| + // Takes ownership of |content| and deletes it when its preview tab is |
| + // destroyed by either being canceled, closed or finishing printing. This |
| + // removes the TabContentsWrapper from its TabStrip and hides it from the |
| + // user. |
| + // Returns true if content has an associated print preview tab. |
| + bool OwnInitiatorTabContents(TabContentsWrapper* content); |
| + |
| + // Called when we no longer need to access the initiator tab, deletes if |
| + // currently owned. Returns true when |content| was owned. |
| + bool ReleaseInitiatorTabContents(TabContentsWrapper* content); |
| // Let others iterate over the list of background printing tabs. |
| std::set<TabContentsWrapper*>::const_iterator begin(); |
| @@ -45,6 +56,13 @@ class BackgroundPrintingManager |
| const NotificationDetails& details) OVERRIDE; |
| private: |
| + // Takes ownership of |content| and deletes it when its preview tab is |
| + // destroyed by either being canceled, closed or finishing printing. This |
| + // removes the TabContentsWrapper from its TabStrip and hides it from the |
| + // user. |
| + void OwnTabContents(TabContentsWrapper* content, |
| + TabContentsWrapper* source_content); |
| + |
| // The set of tabs managed by BackgroundPrintingManager. |
| std::set<TabContentsWrapper*> printing_contents_; |
|
Lei Zhang
2011/08/11 09:47:16
If you add a second set for the initiator tabs we
Sheridan Rawlins
2011/08/16 06:11:54
Done.
|