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

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

Issue 568633002: Extracted MetafilePlayer interface from printing::MetafilePlayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_expose
Patch Set: Thu Sep 11 22:54:16 PDT 2014 Created 6 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PRINT_VIEW_MANAGER_BASE_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASE_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASE_H_ 6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/prefs/pref_member.h" 9 #include "base/prefs/pref_member.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h" 12 #include "content/public/browser/notification_registrar.h"
13 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
14 #include "content/public/browser/web_contents_user_data.h" 14 #include "content/public/browser/web_contents_user_data.h"
15 #include "printing/printed_pages_source.h" 15 #include "printing/printed_pages_source.h"
16 16
17 struct PrintHostMsg_DidPrintPage_Params; 17 struct PrintHostMsg_DidPrintPage_Params;
18 18
19 namespace content { 19 namespace content {
20 class RenderViewHost; 20 class RenderViewHost;
21 } 21 }
22 22
23 namespace printing { 23 namespace printing {
24 24
25 class JobEventDetails; 25 class JobEventDetails;
26 class Metafile; 26 class MetafilePlayer;
27 class PdfToEmfConverter; 27 class PdfToEmfConverter;
28 class PrintJob; 28 class PrintJob;
29 class PrintJobWorkerOwner; 29 class PrintJobWorkerOwner;
30 class PrintQueriesQueue; 30 class PrintQueriesQueue;
31 31
32 // Base class for managing the print commands for a WebContents. 32 // Base class for managing the print commands for a WebContents.
33 class PrintViewManagerBase : public content::NotificationObserver, 33 class PrintViewManagerBase : public content::NotificationObserver,
34 public PrintedPagesSource, 34 public PrintedPagesSource,
35 public content::WebContentsObserver { 35 public content::WebContentsObserver {
36 public: 36 public:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // print_job_ is initialized. 131 // print_job_ is initialized.
132 bool OpportunisticallyCreatePrintJob(int cookie); 132 bool OpportunisticallyCreatePrintJob(int cookie);
133 133
134 // Release the PrinterQuery associated with our |cookie_|. 134 // Release the PrinterQuery associated with our |cookie_|.
135 void ReleasePrinterQuery(); 135 void ReleasePrinterQuery();
136 136
137 #if defined(OS_WIN) 137 #if defined(OS_WIN)
138 // Called on completion of converting the pdf to emf. 138 // Called on completion of converting the pdf to emf.
139 void OnPdfToEmfConverted(const PrintHostMsg_DidPrintPage_Params& params, 139 void OnPdfToEmfConverted(const PrintHostMsg_DidPrintPage_Params& params,
140 double scale_factor, 140 double scale_factor,
141 ScopedVector<Metafile>* emf_files); 141 ScopedVector<MetafilePlayer>* emf_files);
142 #endif // OS_WIN 142 #endif // OS_WIN
143 143
144 content::NotificationRegistrar registrar_; 144 content::NotificationRegistrar registrar_;
145 145
146 // Manages the low-level talk to the printer. 146 // Manages the low-level talk to the printer.
147 scoped_refptr<PrintJob> print_job_; 147 scoped_refptr<PrintJob> print_job_;
148 148
149 // Number of pages to print in the print job. 149 // Number of pages to print in the print job.
150 int number_pages_; 150 int number_pages_;
151 151
(...skipping 21 matching lines...) Expand all
173 BooleanPrefMember printing_enabled_; 173 BooleanPrefMember printing_enabled_;
174 174
175 scoped_refptr<printing::PrintQueriesQueue> queue_; 175 scoped_refptr<printing::PrintQueriesQueue> queue_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBase); 177 DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBase);
178 }; 178 };
179 179
180 } // namespace printing 180 } // namespace printing
181 181
182 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASE_H_ 182 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/pdf_to_emf_converter.cc ('k') | chrome/browser/printing/print_view_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698