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

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

Issue 7056070: PrintPreview: Preview generation should not block print button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments. 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 #ifndef CHROME_BROWSER_PRINTING_BACKGROUND_PRINTING_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRINTING_BACKGROUND_PRINTING_MANAGER_H_
6 #define CHROME_BROWSER_PRINTING_BACKGROUND_PRINTING_MANAGER_H_ 6 #define CHROME_BROWSER_PRINTING_BACKGROUND_PRINTING_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 // Takes ownership of |content| and deletes it when |content| finishes 30 // Takes ownership of |content| and deletes it when |content| finishes
31 // printing. This removes the TabContentsWrapper from its TabStrip and 31 // printing. This removes the TabContentsWrapper from its TabStrip and
32 // hides it from the user. 32 // hides it from the user.
33 void OwnTabContents(TabContentsWrapper* content); 33 void OwnTabContents(TabContentsWrapper* content);
34 34
35 // Let others iterate over the list of background printing tabs. 35 // Let others iterate over the list of background printing tabs.
36 std::set<TabContentsWrapper*>::const_iterator begin(); 36 std::set<TabContentsWrapper*>::const_iterator begin();
37 std::set<TabContentsWrapper*>::const_iterator end(); 37 std::set<TabContentsWrapper*>::const_iterator end();
38 38
39 // Returns true if |printing_contents_| contains |entry|.
40 bool HasTabContents(TabContentsWrapper* entry);
41
39 // NotificationObserver overrides: 42 // NotificationObserver overrides:
40 virtual void Observe(NotificationType type, 43 virtual void Observe(NotificationType type,
41 const NotificationSource& source, 44 const NotificationSource& source,
42 const NotificationDetails& details) OVERRIDE; 45 const NotificationDetails& details) OVERRIDE;
43 46
44 private: 47 private:
45 // The set of tabs managed by BackgroundPrintingManager. 48 // The set of tabs managed by BackgroundPrintingManager.
46 std::set<TabContentsWrapper*> printing_contents_; 49 std::set<TabContentsWrapper*> printing_contents_;
47 50
48 NotificationRegistrar registrar_; 51 NotificationRegistrar registrar_;
49 52
50 DISALLOW_COPY_AND_ASSIGN(BackgroundPrintingManager); 53 DISALLOW_COPY_AND_ASSIGN(BackgroundPrintingManager);
51 }; 54 };
52 55
53 } // namespace printing 56 } // namespace printing
54 57
55 #endif // CHROME_BROWSER_PRINTING_BACKGROUND_PRINTING_MANAGER_H_ 58 #endif // CHROME_BROWSER_PRINTING_BACKGROUND_PRINTING_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698