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

Side by Side Diff: ppapi/proxy/ppb_input_event_proxy.cc

Issue 7608030: Convert the PluginResource to be refcounted. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ppapi/proxy/ppb_input_event_proxy.h" 5 #include "ppapi/proxy/ppb_input_event_proxy.h"
6 6
7 #include "ppapi/c/ppb_audio_config.h" 7 #include "ppapi/c/ppb_audio_config.h"
8 #include "ppapi/proxy/plugin_dispatcher.h" 8 #include "ppapi/proxy/plugin_dispatcher.h"
9 #include "ppapi/proxy/plugin_resource.h" 9 #include "ppapi/proxy/plugin_resource.h"
10 #include "ppapi/proxy/plugin_var_tracker.h" 10 #include "ppapi/proxy/plugin_var_tracker.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 false, 114 false,
115 &CreateInputEventProxy, 115 &CreateInputEventProxy,
116 }; 116 };
117 return &info; 117 return &info;
118 } 118 }
119 119
120 // static 120 // static
121 PP_Resource PPB_InputEvent_Proxy::CreateProxyResource( 121 PP_Resource PPB_InputEvent_Proxy::CreateProxyResource(
122 PP_Instance instance, 122 PP_Instance instance,
123 const InputEventData& data) { 123 const InputEventData& data) {
124 linked_ptr<InputEvent> object(new InputEvent( 124 return PluginResourceTracker::GetInstance()->AddResource(
125 HostResource::MakeInstanceOnly(instance), data)); 125 new InputEvent(HostResource::MakeInstanceOnly(instance), data));
126 return PluginResourceTracker::GetInstance()->AddResource(object);
127 } 126 }
128 127
129 bool PPB_InputEvent_Proxy::OnMessageReceived(const IPC::Message& msg) { 128 bool PPB_InputEvent_Proxy::OnMessageReceived(const IPC::Message& msg) {
130 // There are no IPC messages for this interface. 129 // There are no IPC messages for this interface.
131 NOTREACHED(); 130 NOTREACHED();
132 return false; 131 return false;
133 } 132 }
134 133
135 } // namespace proxy 134 } // namespace proxy
136 } // namespace pp 135 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698