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