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

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

Issue 10483006: Print support for Windows Metro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to ToT... Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/browser/printing/printer_query.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) 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_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 #pragma once 7 #pragma once
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/printing/print_job_worker_owner.h" 12 #include "chrome/browser/printing/print_job_worker_owner.h"
13 #include "printing/print_job_constants.h" 13 #include "printing/print_job_constants.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
15 15
16 class MessageLoop; 16 class MessageLoop;
17 17
18 namespace base { 18 namespace base {
19 class DictionaryValue; 19 class DictionaryValue;
20 } 20 }
21 21
22 namespace printing { 22 namespace printing {
23 23
24 class PrintJobWorker; 24 class PrintDestinationInterface;
25 class PrintJobWorker;
25 26
26 // Query the printer for settings. 27 // Query the printer for settings.
27 class PrinterQuery : public PrintJobWorkerOwner { 28 class PrinterQuery : public PrintJobWorkerOwner {
28 public: 29 public:
29 // GetSettings() UI parameter. 30 // GetSettings() UI parameter.
30 enum GetSettingsAskParam { 31 enum GetSettingsAskParam {
31 DEFAULTS, 32 DEFAULTS,
32 ASK_USER, 33 ASK_USER,
33 }; 34 };
34 35
(...skipping 15 matching lines...) Expand all
50 gfx::NativeView parent_view, 51 gfx::NativeView parent_view,
51 int expected_page_count, 52 int expected_page_count,
52 bool has_selection, 53 bool has_selection,
53 MarginType margin_type, 54 MarginType margin_type,
54 const base::Closure& callback); 55 const base::Closure& callback);
55 56
56 // Updates the current settings with |new_settings| dictionary values. 57 // Updates the current settings with |new_settings| dictionary values.
57 void SetSettings(const base::DictionaryValue& new_settings, 58 void SetSettings(const base::DictionaryValue& new_settings,
58 const base::Closure& callback); 59 const base::Closure& callback);
59 60
61 // Set a destination for the worker.
62 void SetWorkerDestination(PrintDestinationInterface* destination);
63
60 // Stops the worker thread since the client is done with this object. 64 // Stops the worker thread since the client is done with this object.
61 void StopWorker(); 65 void StopWorker();
62 66
63 // Returns true if a GetSettings() call is pending completion. 67 // Returns true if a GetSettings() call is pending completion.
64 bool is_callback_pending() const; 68 bool is_callback_pending() const;
65 69
66 PrintingContext::Result last_status() const { return last_status_; } 70 PrintingContext::Result last_status() const { return last_status_; }
67 71
68 // Returns if a worker thread is still associated to this instance. 72 // Returns if a worker thread is still associated to this instance.
69 bool is_valid() const; 73 bool is_valid() const;
(...skipping 27 matching lines...) Expand all
97 101
98 // Callback waiting to be run. 102 // Callback waiting to be run.
99 base::Closure callback_; 103 base::Closure callback_;
100 104
101 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); 105 DISALLOW_COPY_AND_ASSIGN(PrinterQuery);
102 }; 106 };
103 107
104 } // namespace printing 108 } // namespace printing
105 109
106 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ 110 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/browser/printing/printer_query.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698