OLD | NEW |
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 PRINTING_PRINTING_CONTEXT_ANDROID_H_ | 5 #ifndef PRINTING_PRINTING_CONTEXT_ANDROID_H_ |
6 #define PRINTING_PRINTING_CONTEXT_ANDROID_H_ | 6 #define PRINTING_PRINTING_CONTEXT_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 28 matching lines...) Expand all Loading... |
39 // PrintingContext implementation. | 39 // PrintingContext implementation. |
40 void AskUserForSettings(int max_pages, | 40 void AskUserForSettings(int max_pages, |
41 bool has_selection, | 41 bool has_selection, |
42 bool is_scripted, | 42 bool is_scripted, |
43 const PrintSettingsCallback& callback) override; | 43 const PrintSettingsCallback& callback) override; |
44 Result UseDefaultSettings() override; | 44 Result UseDefaultSettings() override; |
45 gfx::Size GetPdfPaperSizeDeviceUnits() override; | 45 gfx::Size GetPdfPaperSizeDeviceUnits() override; |
46 Result UpdatePrinterSettings(bool external_preview, | 46 Result UpdatePrinterSettings(bool external_preview, |
47 bool show_system_dialog, | 47 bool show_system_dialog, |
48 int page_count) override; | 48 int page_count) override; |
49 Result InitWithSettings(const PrintSettings& settings) override; | |
50 Result NewDocument(const base::string16& document_name) override; | 49 Result NewDocument(const base::string16& document_name) override; |
51 Result NewPage() override; | 50 Result NewPage() override; |
52 Result PageDone() override; | 51 Result PageDone() override; |
53 Result DocumentDone() override; | 52 Result DocumentDone() override; |
54 void Cancel() override; | 53 void Cancel() override; |
55 void ReleaseContext() override; | 54 void ReleaseContext() override; |
56 gfx::NativeDrawingContext context() const override; | 55 gfx::NativeDrawingContext context() const override; |
57 | 56 |
58 // Registers JNI bindings for RegisterContext. | 57 // Registers JNI bindings for RegisterContext. |
59 static bool RegisterPrintingContext(JNIEnv* env); | 58 static bool RegisterPrintingContext(JNIEnv* env); |
60 | 59 |
61 private: | 60 private: |
62 base::android::ScopedJavaGlobalRef<jobject> j_printing_context_; | 61 base::android::ScopedJavaGlobalRef<jobject> j_printing_context_; |
63 | 62 |
64 // The callback from AskUserForSettings to be called when the settings are | 63 // The callback from AskUserForSettings to be called when the settings are |
65 // ready on the Java side | 64 // ready on the Java side |
66 PrintSettingsCallback callback_; | 65 PrintSettingsCallback callback_; |
67 | 66 |
68 DISALLOW_COPY_AND_ASSIGN(PrintingContextAndroid); | 67 DISALLOW_COPY_AND_ASSIGN(PrintingContextAndroid); |
69 }; | 68 }; |
70 | 69 |
71 } // namespace printing | 70 } // namespace printing |
72 | 71 |
73 #endif // PRINTING_PRINTING_CONTEXT_ANDROID_H_ | 72 #endif // PRINTING_PRINTING_CONTEXT_ANDROID_H_ |
74 | 73 |
OLD | NEW |