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

Side by Side Diff: webkit/plugins/ppapi/ppapi_webplugin_impl.cc

Issue 15007012: Track NPObject ownership by the originating plugins' NPP identifier. [2/3] (Chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing forward-define. Created 7 years, 7 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 "webkit/plugins/ppapi/ppapi_webplugin_impl.h" 5 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // any non-postMessage calls to it. 141 // any non-postMessage calls to it.
142 if (object) { 142 if (object) {
143 instance_->message_channel().SetPassthroughObject(object->np_object()); 143 instance_->message_channel().SetPassthroughObject(object->np_object());
144 } 144 }
145 NPObject* message_channel_np_object(instance_->message_channel().np_object()); 145 NPObject* message_channel_np_object(instance_->message_channel().np_object());
146 // The object is expected to be retained before it is returned. 146 // The object is expected to be retained before it is returned.
147 WebKit::WebBindings::retainObject(message_channel_np_object); 147 WebKit::WebBindings::retainObject(message_channel_np_object);
148 return message_channel_np_object; 148 return message_channel_np_object;
149 } 149 }
150 150
151 NPP WebPluginImpl::pluginNPP() {
152 // We must return the same pointer that the NPP parameter to NPObject binding
153 // calls will contain. WebKit will treat it as opaque, though, so it needn't
154 // be an actual NPP_t instance.
jamesr 2013/05/21 18:20:21 this is too crazy. if the type is NPP_t*, you real
Wez 2013/05/22 06:55:25 Done.
155 return reinterpret_cast<NPP>(this);
156 }
157
151 bool WebPluginImpl::getFormValue(WebString& value) { 158 bool WebPluginImpl::getFormValue(WebString& value) {
152 return false; 159 return false;
153 } 160 }
154 161
155 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { 162 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) {
156 if (!instance_->FlashIsFullscreenOrPending()) 163 if (!instance_->FlashIsFullscreenOrPending())
157 instance_->Paint(canvas, plugin_rect_, rect); 164 instance_->Paint(canvas, plugin_rect_, rect);
158 } 165 }
159 166
160 void WebPluginImpl::updateGeometry( 167 void WebPluginImpl::updateGeometry(
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 void WebPluginImpl::rotateView(RotationType type) { 292 void WebPluginImpl::rotateView(RotationType type) {
286 instance_->RotateView(type); 293 instance_->RotateView(type);
287 } 294 }
288 295
289 bool WebPluginImpl::isPlaceholder() { 296 bool WebPluginImpl::isPlaceholder() {
290 return false; 297 return false;
291 } 298 }
292 299
293 } // namespace ppapi 300 } // namespace ppapi
294 } // namespace webkit 301 } // namespace webkit
OLDNEW
« webkit/plugins/npapi/webplugin_impl.h ('K') | « webkit/plugins/ppapi/ppapi_webplugin_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698