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

Side by Side Diff: trunk/src/content/renderer/webplugin_delegate_proxy.cc

Issue 15757007: Revert 202364 "Track NPObject ownership by the originating plugi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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/webplugin_delegate_proxy.h" 5 #include "content/renderer/webplugin_delegate_proxy.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #elif defined(USE_X11) 9 #elif defined(USE_X11)
10 #include <cairo/cairo.h> 10 #include <cairo/cairo.h>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 uses_shared_bitmaps_(false), 205 uses_shared_bitmaps_(false),
206 #if defined(OS_MACOSX) 206 #if defined(OS_MACOSX)
207 uses_compositor_(false), 207 uses_compositor_(false),
208 #elif defined(OS_WIN) 208 #elif defined(OS_WIN)
209 dummy_activation_window_(NULL), 209 dummy_activation_window_(NULL),
210 #endif 210 #endif
211 window_(gfx::kNullPluginWindow), 211 window_(gfx::kNullPluginWindow),
212 mime_type_(mime_type), 212 mime_type_(mime_type),
213 instance_id_(MSG_ROUTING_NONE), 213 instance_id_(MSG_ROUTING_NONE),
214 npobject_(NULL), 214 npobject_(NULL),
215 npp_(new NPP_t),
216 sad_plugin_(NULL), 215 sad_plugin_(NULL),
217 invalidate_pending_(false), 216 invalidate_pending_(false),
218 transparent_(false), 217 transparent_(false),
219 front_buffer_index_(0), 218 front_buffer_index_(0),
220 page_url_(render_view_->webview()->mainFrame()->document().url()) { 219 page_url_(render_view_->webview()->mainFrame()->document().url()) {
221 } 220 }
222 221
223 WebPluginDelegateProxy::~WebPluginDelegateProxy() { 222 WebPluginDelegateProxy::~WebPluginDelegateProxy() {
224 if (npobject_) 223 if (npobject_)
225 WebBindings::releaseObject(npobject_); 224 WebBindings::releaseObject(npobject_);
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 Send(new PluginMsg_GetPluginScriptableObject(instance_id_, &route_id)); 736 Send(new PluginMsg_GetPluginScriptableObject(instance_id_, &route_id));
738 if (route_id == MSG_ROUTING_NONE) 737 if (route_id == MSG_ROUTING_NONE)
739 return NULL; 738 return NULL;
740 739
741 npobject_ = NPObjectProxy::Create( 740 npobject_ = NPObjectProxy::Create(
742 channel_host_.get(), route_id, 0, page_url_); 741 channel_host_.get(), route_id, 0, page_url_);
743 742
744 return WebBindings::retainObject(npobject_); 743 return WebBindings::retainObject(npobject_);
745 } 744 }
746 745
747 NPP WebPluginDelegateProxy::GetPluginNPP() {
748 // Return a dummy NPP for WebKit to use to identify this plugin.
749 return npp_.get();
750 }
751
752 bool WebPluginDelegateProxy::GetFormValue(string16* value) { 746 bool WebPluginDelegateProxy::GetFormValue(string16* value) {
753 bool success = false; 747 bool success = false;
754 Send(new PluginMsg_GetFormValue(instance_id_, value, &success)); 748 Send(new PluginMsg_GetFormValue(instance_id_, value, &success));
755 return success; 749 return success;
756 } 750 }
757 751
758 void WebPluginDelegateProxy::DidFinishLoadWithReason( 752 void WebPluginDelegateProxy::DidFinishLoadWithReason(
759 const GURL& url, NPReason reason, int notify_id) { 753 const GURL& url, NPReason reason, int notify_id) {
760 Send(new PluginMsg_DidFinishLoadWithReason( 754 Send(new PluginMsg_DidFinishLoadWithReason(
761 instance_id_, url, reason, notify_id)); 755 instance_id_, url, reason, notify_id));
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 1200
1207 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, 1201 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow,
1208 int resource_id) { 1202 int resource_id) {
1209 if (!plugin_) 1203 if (!plugin_)
1210 return; 1204 return;
1211 1205
1212 plugin_->URLRedirectResponse(allow, resource_id); 1206 plugin_->URLRedirectResponse(allow, resource_id);
1213 } 1207 }
1214 1208
1215 } // namespace content 1209 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/renderer/webplugin_delegate_proxy.h ('k') | trunk/src/webkit/glue/cpp_bound_class.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698