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

Side by Side Diff: trunk/src/content/renderer/browser_plugin/browser_plugin_bindings.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/browser_plugin/browser_plugin_bindings.h" 5 #include "content/renderer/browser_plugin/browser_plugin_bindings.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 } 810 }
811 811
812 BrowserPluginBindings::BrowserPluginNPObject::~BrowserPluginNPObject() { 812 BrowserPluginBindings::BrowserPluginNPObject::~BrowserPluginNPObject() {
813 } 813 }
814 814
815 BrowserPluginBindings::BrowserPluginBindings(BrowserPlugin* instance) 815 BrowserPluginBindings::BrowserPluginBindings(BrowserPlugin* instance)
816 : instance_(instance), 816 : instance_(instance),
817 np_object_(NULL), 817 np_object_(NULL),
818 weak_ptr_factory_(this) { 818 weak_ptr_factory_(this) {
819 NPObject* obj = 819 NPObject* obj =
820 WebBindings::createObject(instance->pluginNPP(), 820 WebBindings::createObject(NULL, &browser_plugin_message_class);
821 &browser_plugin_message_class);
822 np_object_ = static_cast<BrowserPluginBindings::BrowserPluginNPObject*>(obj); 821 np_object_ = static_cast<BrowserPluginBindings::BrowserPluginNPObject*>(obj);
823 np_object_->message_channel = weak_ptr_factory_.GetWeakPtr(); 822 np_object_->message_channel = weak_ptr_factory_.GetWeakPtr();
824 823
825 method_bindings_.push_back(new BrowserPluginBindingAttachWindowTo); 824 method_bindings_.push_back(new BrowserPluginBindingAttachWindowTo);
826 method_bindings_.push_back(new BrowserPluginBindingBack); 825 method_bindings_.push_back(new BrowserPluginBindingBack);
827 method_bindings_.push_back(new BrowserPluginBindingCanGoBack); 826 method_bindings_.push_back(new BrowserPluginBindingCanGoBack);
828 method_bindings_.push_back(new BrowserPluginBindingCanGoForward); 827 method_bindings_.push_back(new BrowserPluginBindingCanGoForward);
829 method_bindings_.push_back(new BrowserPluginBindingForward); 828 method_bindings_.push_back(new BrowserPluginBindingForward);
830 method_bindings_.push_back(new BrowserPluginBindingGetProcessID); 829 method_bindings_.push_back(new BrowserPluginBindingGetProcessID);
831 method_bindings_.push_back(new BrowserPluginBindingGetRouteID); 830 method_bindings_.push_back(new BrowserPluginBindingGetRouteID);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 for (PropertyBindingList::iterator iter = property_bindings_.begin(); 916 for (PropertyBindingList::iterator iter = property_bindings_.begin();
918 iter != property_bindings_.end(); 917 iter != property_bindings_.end();
919 ++iter) { 918 ++iter) {
920 if ((*iter)->MatchesName(name)) 919 if ((*iter)->MatchesName(name))
921 return (*iter)->GetProperty(this, result); 920 return (*iter)->GetProperty(this, result);
922 } 921 }
923 return false; 922 return false;
924 } 923 }
925 924
926 } // namespace content 925 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/renderer/browser_plugin/browser_plugin.cc ('k') | trunk/src/content/renderer/webplugin_delegate_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698