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

Unified Diff: ppapi/proxy/ppb_input_event_proxy.cc

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/ppb_input_event_proxy.cc
diff --git a/ppapi/proxy/ppb_input_event_proxy.cc b/ppapi/proxy/ppb_input_event_proxy.cc
index 593bf1e500205ac57a80733070918a3ef70fe110..a9b1a4ffc5de24138742ff2644aad54a00333858 100644
--- a/ppapi/proxy/ppb_input_event_proxy.cc
+++ b/ppapi/proxy/ppb_input_event_proxy.cc
@@ -6,28 +6,29 @@
#include "ppapi/c/ppb_audio_config.h"
#include "ppapi/proxy/plugin_dispatcher.h"
-#include "ppapi/proxy/plugin_resource.h"
#include "ppapi/proxy/plugin_var_tracker.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/shared_impl/input_event_impl.h"
+#include "ppapi/shared_impl/resource.h"
#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/thunk.h"
using ppapi::HostResource;
using ppapi::InputEventData;
using ppapi::InputEventImpl;
+using ppapi::Resource;
using ppapi::thunk::PPB_InputEvent_API;
namespace pp {
namespace proxy {
// The implementation is actually in InputEventImpl.
-class InputEvent : public PluginResource, public InputEventImpl {
+class InputEvent : public Resource, public InputEventImpl {
public:
InputEvent(const HostResource& resource, const InputEventData& data);
virtual ~InputEvent();
- // ResourceObjectBase overrides.
+ // Resource overrides.
virtual PPB_InputEvent_API* AsPPB_InputEvent_API() OVERRIDE;
// InputEventImpl overrides.
@@ -38,7 +39,7 @@ class InputEvent : public PluginResource, public InputEventImpl {
};
InputEvent::InputEvent(const HostResource& resource, const InputEventData& data)
- : PluginResource(resource),
+ : Resource(resource),
InputEventImpl(data) {
}
@@ -122,8 +123,8 @@ const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetWheelInputEventInfo() {
PP_Resource PPB_InputEvent_Proxy::CreateProxyResource(
PP_Instance instance,
const InputEventData& data) {
- return PluginResourceTracker::GetInstance()->AddResource(
- new InputEvent(HostResource::MakeInstanceOnly(instance), data));
+ return (new InputEvent(HostResource::MakeInstanceOnly(instance), data))->
+ GetReference();
}
bool PPB_InputEvent_Proxy::OnMessageReceived(const IPC::Message& msg) {

Powered by Google App Engine
This is Rietveld 408576698