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

Side by Side Diff: content/renderer/pepper/ppb_widget_impl.cc

Issue 20777009: A few more cleanups to the pepper code. Dispatch IPCs in the sockets implementations directly by ha… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 4 months 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 | Annotate | Revision Log
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 #include "content/renderer/pepper/ppb_widget_impl.h" 5 #include "content/renderer/pepper/ppb_widget_impl.h"
6 6
7 #include "content/renderer/pepper/host_globals.h"
7 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 8 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
8 #include "content/renderer/pepper/ppb_image_data_impl.h" 9 #include "content/renderer/pepper/ppb_image_data_impl.h"
9 #include "content/renderer/pepper/plugin_module.h" 10 #include "content/renderer/pepper/plugin_module.h"
10 #include "content/renderer/pepper/resource_helper.h"
11 #include "ppapi/c/dev/ppp_widget_dev.h" 11 #include "ppapi/c/dev/ppp_widget_dev.h"
12 #include "ppapi/thunk/enter.h" 12 #include "ppapi/thunk/enter.h"
13 #include "ppapi/thunk/ppb_input_event_api.h" 13 #include "ppapi/thunk/ppb_input_event_api.h"
14 #include "ppapi/thunk/ppb_widget_api.h" 14 #include "ppapi/thunk/ppb_widget_api.h"
15 15
16 using ppapi::thunk::EnterResourceNoLock; 16 using ppapi::thunk::EnterResourceNoLock;
17 using ppapi::thunk::PPB_ImageData_API; 17 using ppapi::thunk::PPB_ImageData_API;
18 using ppapi::thunk::PPB_InputEvent_API; 18 using ppapi::thunk::PPB_InputEvent_API;
19 using ppapi::thunk::PPB_Widget_API; 19 using ppapi::thunk::PPB_Widget_API;
20 20
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 location_ = *location; 58 location_ = *location;
59 SetLocationInternal(location); 59 SetLocationInternal(location);
60 } 60 }
61 61
62 void PPB_Widget_Impl::SetScale(float scale) { 62 void PPB_Widget_Impl::SetScale(float scale) {
63 scale_ = scale; 63 scale_ = scale;
64 } 64 }
65 65
66 void PPB_Widget_Impl::Invalidate(const PP_Rect* dirty) { 66 void PPB_Widget_Impl::Invalidate(const PP_Rect* dirty) {
67 PepperPluginInstanceImpl* plugin_instance = 67 PepperPluginInstanceImpl* plugin_instance =
68 ResourceHelper::GetPluginInstance(this); 68 HostGlobals::Get()->GetInstance(pp_instance());
69 if (!plugin_instance) 69 if (!plugin_instance)
70 return; 70 return;
71 const PPP_Widget_Dev* widget = static_cast<const PPP_Widget_Dev*>( 71 const PPP_Widget_Dev* widget = static_cast<const PPP_Widget_Dev*>(
72 plugin_instance->module()->GetPluginInterface(PPP_WIDGET_DEV_INTERFACE)); 72 plugin_instance->module()->GetPluginInterface(PPP_WIDGET_DEV_INTERFACE));
73 if (!widget) 73 if (!widget)
74 return; 74 return;
75 widget->Invalidate(pp_instance(), pp_resource(), dirty); 75 widget->Invalidate(pp_instance(), pp_resource(), dirty);
76 } 76 }
77 77
78 } // namespace content 78 } // namespace content
79 79
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698