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

Unified Diff: content/renderer/pepper/ppb_scrollbar_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, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/ppb_scrollbar_impl.cc
===================================================================
--- content/renderer/pepper/ppb_scrollbar_impl.cc (revision 214423)
+++ content/renderer/pepper/ppb_scrollbar_impl.cc (working copy)
@@ -9,10 +9,10 @@
#include "base/message_loop/message_loop.h"
#include "content/renderer/pepper/common.h"
#include "content/renderer/pepper/event_conversion.h"
+#include "content/renderer/pepper/host_globals.h"
#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
#include "content/renderer/pepper/plugin_module.h"
#include "content/renderer/pepper/ppb_image_data_impl.h"
-#include "content/renderer/pepper/resource_helper.h"
#include "ppapi/c/dev/ppp_scrollbar_dev.h"
#include "ppapi/thunk/thunk.h"
#include "skia/ext/platform_canvas.h"
@@ -53,12 +53,12 @@
void PPB_Scrollbar_Impl::Init(bool vertical) {
PepperPluginInstanceImpl* plugin_instance =
- ResourceHelper::GetPluginInstance(this);
+ HostGlobals::Get()->GetInstance(pp_instance());
if (!plugin_instance)
return;
scrollbar_.reset(WebPluginScrollbar::createForPlugin(
vertical ? WebScrollbar::Vertical : WebScrollbar::Horizontal,
- ResourceHelper::GetPluginInstance(this)->container(),
+ plugin_instance->container(),
static_cast<WebKit::WebPluginScrollbarClient*>(this)));
}
@@ -169,7 +169,8 @@
}
void PPB_Scrollbar_Impl::valueChanged(WebKit::WebPluginScrollbar* scrollbar) {
- PluginModule* plugin_module = ResourceHelper::GetPluginModule(this);
+ PluginModule* plugin_module =
+ HostGlobals::Get()->GetInstance(pp_instance())->module();
if (!plugin_module)
return;
@@ -190,7 +191,8 @@
}
void PPB_Scrollbar_Impl::overlayChanged(WebPluginScrollbar* scrollbar) {
- PluginModule* plugin_module = ResourceHelper::GetPluginModule(this);
+ PluginModule* plugin_module =
+ HostGlobals::Get()->GetInstance(pp_instance())->module();
if (!plugin_module)
return;

Powered by Google App Engine
This is Rietveld 408576698