Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.h

Issue 2476113002: Change call-sites now that SkCanvas is not ref-counted (Closed)
Patch Set: no need for unique check on unique_ptr Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, guaranteed to be valid.
840 sk_sp<blink::WebCanvas> canvas_; 840 blink::WebCanvas* canvas_;
f(malita) 2016/11/14 17:29:15 This changes the ownership model. Are we sure the
reed1 2016/11/14 20:50:08 Done.
841 // An array of page ranges. 841 // An array of page ranges.
842 std::vector<PP_PrintPageNumberRange_Dev> ranges_; 842 std::vector<PP_PrintPageNumberRange_Dev> ranges_;
843 843
844 scoped_refptr<ppapi::Resource> gamepad_impl_; 844 scoped_refptr<ppapi::Resource> gamepad_impl_;
845 scoped_refptr<ppapi::Resource> uma_private_impl_; 845 scoped_refptr<ppapi::Resource> uma_private_impl_;
846 846
847 // The plugin print interface. 847 // The plugin print interface.
848 const PPP_Printing_Dev* plugin_print_interface_; 848 const PPP_Printing_Dev* plugin_print_interface_;
849 849
850 // The plugin 3D interface. 850 // The plugin 3D interface.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 // view change events. 981 // view change events.
982 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; 982 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_;
983 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; 983 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_;
984 984
985 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); 985 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl);
986 }; 986 };
987 987
988 } // namespace content 988 } // namespace content
989 989
990 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ 990 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698