| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 scoped_refptr<PPB_ImageData_Impl> last_printed_page_; | 832 scoped_refptr<PPB_ImageData_Impl> last_printed_page_; |
| 833 #endif // defined(OS_MACOSX) | 833 #endif // defined(OS_MACOSX) |
| 834 // Always when printing to PDF on Linux and when printing for preview on Mac | 834 // Always when printing to PDF on Linux and when printing for preview on Mac |
| 835 // and Win, the entire document goes into one metafile. However, when users | 835 // and Win, the entire document goes into one metafile. However, when users |
| 836 // print only a subset of all the pages, it is impossible to know if a call | 836 // print only a subset of all the pages, it is impossible to know if a call |
| 837 // to PrintPage() is the last call. Thus in PrintPage(), just store the page | 837 // to PrintPage() is the last call. Thus in PrintPage(), just store the page |
| 838 // number in |ranges_|. The hack is in PrintEnd(), where a valid |canvas_| | 838 // number in |ranges_|. The hack is in PrintEnd(), where a valid |canvas_| |
| 839 // is preserved in PrintWebViewHelper::PrintPages. This makes it possible | 839 // is preserved in PrintWebViewHelper::PrintPages. This makes it possible |
| 840 // to generate the entire PDF given the variables below: | 840 // to generate the entire PDF given the variables below: |
| 841 // | 841 // |
| 842 // The most recently used WebCanvas to be used in printEnd(). Caller must | 842 // The most recently used WebCanvas, guaranteed to be valid. |
| 843 // ensure that it remains valid until that point. | 843 sk_sp<blink::WebCanvas> canvas_; |
| 844 blink::WebCanvas* canvas_; | |
| 845 // An array of page ranges. | 844 // An array of page ranges. |
| 846 std::vector<PP_PrintPageNumberRange_Dev> ranges_; | 845 std::vector<PP_PrintPageNumberRange_Dev> ranges_; |
| 847 | 846 |
| 848 scoped_refptr<ppapi::Resource> gamepad_impl_; | 847 scoped_refptr<ppapi::Resource> gamepad_impl_; |
| 849 scoped_refptr<ppapi::Resource> uma_private_impl_; | 848 scoped_refptr<ppapi::Resource> uma_private_impl_; |
| 850 | 849 |
| 851 // The plugin print interface. | 850 // The plugin print interface. |
| 852 const PPP_Printing_Dev* plugin_print_interface_; | 851 const PPP_Printing_Dev* plugin_print_interface_; |
| 853 | 852 |
| 854 // The plugin 3D interface. | 853 // The plugin 3D interface. |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 // view change events. | 984 // view change events. |
| 986 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 985 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 987 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 986 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
| 988 | 987 |
| 989 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 988 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 990 }; | 989 }; |
| 991 | 990 |
| 992 } // namespace content | 991 } // namespace content |
| 993 | 992 |
| 994 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 993 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |