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

Unified Diff: chrome/browser/printing/background_printing_manager.h

Issue 7574002: Be able to print items that do window.print(); window.close() (airline tix e.g.) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prefs/pref_notifier_impl.cc ('k') | chrome/browser/printing/background_printing_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/prefs/pref_notifier_impl.cc ('k') | chrome/browser/printing/background_printing_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698