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

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

Issue 2974183002: Remove bad CallJavascriptFunctionUnsafe call from PrintPreviewUI (Closed)
Patch Set: Rebase Created 3 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/printing/background_printing_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 30 matching lines...) Expand all
41 // Returns true if |printing_contents_map_| contains |preview_dialog|. 41 // Returns true if |printing_contents_map_| contains |preview_dialog|.
42 bool HasPrintPreviewDialog(content::WebContents* preview_dialog); 42 bool HasPrintPreviewDialog(content::WebContents* preview_dialog);
43 43
44 // Let others see the list of background printing contents. 44 // Let others see the list of background printing contents.
45 std::set<content::WebContents*> CurrentContentSet(); 45 std::set<content::WebContents*> CurrentContentSet();
46 46
47 // Delete all preview contents that are associated with |browser_context|. 47 // Delete all preview contents that are associated with |browser_context|.
48 void DeletePreviewContentsForBrowserContext( 48 void DeletePreviewContentsForBrowserContext(
49 content::BrowserContext* browser_context); 49 content::BrowserContext* browser_context);
50 50
51 void OnPrintRequestCancelled(content::WebContents* preview_dialog);
52
51 private: 53 private:
52 // content::NotificationObserver overrides: 54 // content::NotificationObserver overrides:
53 void Observe(int type, 55 void Observe(int type,
54 const content::NotificationSource& source, 56 const content::NotificationSource& source,
55 const content::NotificationDetails& details) override; 57 const content::NotificationDetails& details) override;
56 58
57 // Schedule deletion of |preview_contents|. 59 // Schedule deletion of |preview_contents|.
58 void DeletePreviewContents(content::WebContents* preview_contents); 60 void DeletePreviewContents(content::WebContents* preview_contents);
59 61
60 // A map from print preview WebContentses (managed by 62 // A map from print preview WebContentses (managed by
61 // BackgroundPrintingManager) to the Observers that observe them. 63 // BackgroundPrintingManager) to the Observers that observe them.
62 std::map<content::WebContents*, std::unique_ptr<Observer>> 64 std::map<content::WebContents*, std::unique_ptr<Observer>>
63 printing_contents_map_; 65 printing_contents_map_;
64 66
65 content::NotificationRegistrar registrar_; 67 content::NotificationRegistrar registrar_;
66 68
67 SEQUENCE_CHECKER(sequence_checker_); 69 SEQUENCE_CHECKER(sequence_checker_);
68 70
69 DISALLOW_COPY_AND_ASSIGN(BackgroundPrintingManager); 71 DISALLOW_COPY_AND_ASSIGN(BackgroundPrintingManager);
70 }; 72 };
71 73
72 } // namespace printing 74 } // namespace printing
73 75
74 #endif // CHROME_BROWSER_PRINTING_BACKGROUND_PRINTING_MANAGER_H_ 76 #endif // CHROME_BROWSER_PRINTING_BACKGROUND_PRINTING_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/background_printing_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698