OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
Vitaly Buka (NO REVIEWS)
2013/08/14 16:23:42
// Copyright 2013 The Chromium Authors. All rights
cimamoglu1
2013/08/14 20:38:10
Done.
| |
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 PRINTING_PRINTING_CONTEXT_NO_SYSTEM_DIALOG_H_ | 5 #ifndef PRINTING_PRINTING_CONTEXT_ANDROID_H_ |
6 #define PRINTING_PRINTING_CONTEXT_NO_SYSTEM_DIALOG_H_ | 6 #define PRINTING_PRINTING_CONTEXT_ANDROID_H_ |
7 | |
8 #include <jni.h> | |
7 | 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
12 #include "base/android/scoped_java_ref.h" | |
10 #include "printing/printing_context.h" | 13 #include "printing/printing_context.h" |
11 | 14 |
12 namespace base { | |
13 class DictionaryValue; | |
14 } | |
15 | |
16 namespace printing { | 15 namespace printing { |
17 | 16 |
18 class PRINTING_EXPORT PrintingContextNoSystemDialog : public PrintingContext { | 17 class PRINTING_EXPORT PrintingContextAndroid : public PrintingContext { |
19 public: | 18 public: |
20 explicit PrintingContextNoSystemDialog(const std::string& app_locale); | 19 explicit PrintingContextAndroid(const std::string& app_locale); |
21 virtual ~PrintingContextNoSystemDialog(); | 20 virtual ~PrintingContextAndroid(); |
22 | 21 |
23 // PrintingContext implementation. | 22 // PrintingContext implementation. |
24 virtual void AskUserForSettings( | 23 virtual void AskUserForSettings( |
25 gfx::NativeView parent_view, | 24 gfx::NativeView parent_view, |
26 int max_pages, | 25 int max_pages, |
27 bool has_selection, | 26 bool has_selection, |
28 const PrintSettingsCallback& callback) OVERRIDE; | 27 const PrintSettingsCallback& callback) OVERRIDE; |
29 virtual Result UseDefaultSettings() OVERRIDE; | 28 virtual Result UseDefaultSettings() OVERRIDE; |
30 virtual Result UpdatePrinterSettings( | 29 virtual Result UpdatePrinterSettings( |
31 const base::DictionaryValue& job_settings, | 30 const base::DictionaryValue& job_settings, |
32 const PageRanges& ranges) OVERRIDE; | 31 const PageRanges& ranges) OVERRIDE; |
33 virtual Result InitWithSettings(const PrintSettings& settings) OVERRIDE; | 32 virtual Result InitWithSettings(const PrintSettings& settings) OVERRIDE; |
34 virtual Result NewDocument(const string16& document_name) OVERRIDE; | 33 virtual Result NewDocument(const string16& document_name) OVERRIDE; |
35 virtual Result NewPage() OVERRIDE; | 34 virtual Result NewPage() OVERRIDE; |
36 virtual Result PageDone() OVERRIDE; | 35 virtual Result PageDone() OVERRIDE; |
37 virtual Result DocumentDone() OVERRIDE; | 36 virtual Result DocumentDone() OVERRIDE; |
38 virtual void Cancel() OVERRIDE; | 37 virtual void Cancel() OVERRIDE; |
39 virtual void ReleaseContext() OVERRIDE; | 38 virtual void ReleaseContext() OVERRIDE; |
40 virtual gfx::NativeDrawingContext context() const OVERRIDE; | 39 virtual gfx::NativeDrawingContext context() const OVERRIDE; |
41 | 40 |
41 static bool RegisterPrintingContext(JNIEnv* env); | |
42 | |
42 private: | 43 private: |
43 DISALLOW_COPY_AND_ASSIGN(PrintingContextNoSystemDialog); | 44 base::android::ScopedJavaGlobalRef<jobject> j_printing_context_; |
45 | |
46 DISALLOW_COPY_AND_ASSIGN(PrintingContextAndroid); | |
44 }; | 47 }; |
45 | 48 |
46 } // namespace printing | 49 } // namespace printing |
47 | 50 |
48 #endif // PRINTING_PRINTING_CONTEXT_NO_SYSTEM_DIALOG_H_ | 51 #endif // PRINTING_PRINTING_CONTEXT_ANDROID_H_ |
52 | |
OLD | NEW |