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

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

Issue 547203002: Delete temporarily dir for PDF to EMF conversion after all EMF files closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mon Sep 8 12:19:46 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 PdfToEmfConverter; 27 class PdfToEmfConverter;
27 class PrintJob; 28 class PrintJob;
28 class PrintJobWorkerOwner; 29 class PrintJobWorkerOwner;
29 class PrintQueriesQueue; 30 class PrintQueriesQueue;
30 31
31 // Base class for managing the print commands for a WebContents. 32 // Base class for managing the print commands for a WebContents.
32 class PrintViewManagerBase : public content::NotificationObserver, 33 class PrintViewManagerBase : public content::NotificationObserver,
33 public PrintedPagesSource, 34 public PrintedPagesSource,
34 public content::WebContentsObserver { 35 public content::WebContentsObserver {
35 public: 36 public:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // print_job_ is initialized. 131 // print_job_ is initialized.
131 bool OpportunisticallyCreatePrintJob(int cookie); 132 bool OpportunisticallyCreatePrintJob(int cookie);
132 133
133 // Release the PrinterQuery associated with our |cookie_|. 134 // Release the PrinterQuery associated with our |cookie_|.
134 void ReleasePrinterQuery(); 135 void ReleasePrinterQuery();
135 136
136 #if defined(OS_WIN) 137 #if defined(OS_WIN)
137 // Called on completion of converting the pdf to emf. 138 // Called on completion of converting the pdf to emf.
138 void OnPdfToEmfConverted(const PrintHostMsg_DidPrintPage_Params& params, 139 void OnPdfToEmfConverted(const PrintHostMsg_DidPrintPage_Params& params,
139 double scale_factor, 140 double scale_factor,
140 const std::vector<base::FilePath>& emf_file); 141 ScopedVector<Metafile>* emf_files);
141 #endif // OS_WIN 142 #endif // OS_WIN
142 143
143 content::NotificationRegistrar registrar_; 144 content::NotificationRegistrar registrar_;
144 145
145 // Manages the low-level talk to the printer. 146 // Manages the low-level talk to the printer.
146 scoped_refptr<PrintJob> print_job_; 147 scoped_refptr<PrintJob> print_job_;
147 148
148 // Number of pages to print in the print job. 149 // Number of pages to print in the print job.
149 int number_pages_; 150 int number_pages_;
150 151
(...skipping 21 matching lines...) Expand all
172 BooleanPrefMember printing_enabled_; 173 BooleanPrefMember printing_enabled_;
173 174
174 scoped_refptr<printing::PrintQueriesQueue> queue_; 175 scoped_refptr<printing::PrintQueriesQueue> queue_;
175 176
176 DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBase); 177 DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBase);
177 }; 178 };
178 179
179 } // namespace printing 180 } // namespace printing
180 181
181 #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