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