| 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..6a7ed31d30761d548ae23a51207176458b72e2ef 100644
|
| --- a/chrome/browser/printing/background_printing_manager.h
|
| +++ b/chrome/browser/printing/background_printing_manager.h
|
| @@ -30,24 +30,55 @@ 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();
|
| std::set<TabContentsWrapper*>::const_iterator end();
|
|
|
| + // Let others iterate over the list of background initiator tabs.
|
| + std::set<TabContentsWrapper*>::const_iterator begin_initiator();
|
| + std::set<TabContentsWrapper*>::const_iterator end_initiator();
|
| +
|
| // Returns true if |printing_contents_| contains |entry|.
|
| bool HasTabContents(TabContentsWrapper* entry);
|
|
|
| + // Returns true if |initiator_contents_| contains |entry|.
|
| + bool HasInitiatorTabContents(TabContentsWrapper* entry);
|
| +
|
| // NotificationObserver overrides:
|
| virtual void Observe(int type,
|
| const NotificationSource& source,
|
| const NotificationDetails& details) OVERRIDE;
|
|
|
| private:
|
| + typedef std::set<TabContentsWrapper*> TabContentsWrapperSet;
|
| +
|
| + // 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,
|
| + TabContentsWrapperSet* wrapper_set);
|
| +
|
| // The set of tabs managed by BackgroundPrintingManager.
|
| std::set<TabContentsWrapper*> printing_contents_;
|
|
|
| + // The set of tabs managed by BackgroundPrintingManager.
|
| + std::set<TabContentsWrapper*> initiator_contents_;
|
| +
|
| NotificationRegistrar registrar_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(BackgroundPrintingManager);
|
|
|