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

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

Issue 246027: Reverting 27389. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_PRINTER_QUERY_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_
6 #define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ 6 #define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_
7 7
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/ref_counted.h"
10 #include "chrome/browser/printing/print_job_worker_owner.h" 9 #include "chrome/browser/printing/print_job_worker_owner.h"
11 10
12 class CancelableTask; 11 class CancelableTask;
13 class MessageLoop; 12 class MessageLoop;
14 13
15 namespace base { 14 namespace base {
16 class Thread; 15 class Thread;
17 } 16 }
18 17
19 namespace printing { 18 namespace printing {
20 19
21 class PrintJobWorker; 20 class PrintJobWorker;
22 21
23 // Query the printer for settings. 22 // Query the printer for settings.
24 class PrinterQuery : public base::RefCountedThreadSafe<PrinterQuery>, 23 class PrinterQuery : public PrintJobWorkerOwner {
25 public PrintJobWorkerOwner {
26 public: 24 public:
27 // GetSettings() UI parameter. 25 // GetSettings() UI parameter.
28 enum GetSettingsAskParam { 26 enum GetSettingsAskParam {
29 DEFAULTS, 27 DEFAULTS,
30 ASK_USER, 28 ASK_USER,
31 }; 29 };
32 30
33 PrinterQuery(); 31 PrinterQuery();
34 virtual ~PrinterQuery(); 32 virtual ~PrinterQuery();
35 33
36 // PrintJobWorkerOwner 34 // PrintJobWorkerOwner
37 virtual void AddRef() {
38 return base::RefCountedThreadSafe<PrinterQuery>::AddRef();
39 }
40 virtual void Release() {
41 return base::RefCountedThreadSafe<PrinterQuery>::Release();
42 }
43 virtual void GetSettingsDone(const PrintSettings& new_settings, 35 virtual void GetSettingsDone(const PrintSettings& new_settings,
44 PrintingContext::Result result); 36 PrintingContext::Result result);
45 virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner); 37 virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner);
46 virtual MessageLoop* message_loop() { 38 virtual MessageLoop* message_loop() {
47 return ui_message_loop_; 39 return ui_message_loop_;
48 } 40 }
49 virtual const PrintSettings& settings() const { return settings_; } 41 virtual const PrintSettings& settings() const { return settings_; }
50 42
51 virtual int cookie() const { return cookie_; } 43 virtual int cookie() const { return cookie_; }
52 44
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 90
99 // Task waiting to be executed. 91 // Task waiting to be executed.
100 scoped_ptr<CancelableTask> callback_; 92 scoped_ptr<CancelableTask> callback_;
101 93
102 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); 94 DISALLOW_COPY_AND_ASSIGN(PrinterQuery);
103 }; 95 };
104 96
105 } // namespace printing 97 } // namespace printing
106 98
107 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ 99 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job_worker_owner.h ('k') | chrome/browser/renderer_host/render_crash_handler_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698