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: content/renderer/browser_plugin/browser_plugin_bindings.cc

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code 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 21 matching lines...) Expand all
32 using WebKit::WebDOMMessageEvent; 32 using WebKit::WebDOMMessageEvent;
33 using WebKit::WebPluginContainer; 33 using WebKit::WebPluginContainer;
34 using WebKit::WebString; 34 using WebKit::WebString;
35 35
36 namespace content { 36 namespace content {
37 37
38 namespace { 38 namespace {
39 39
40 BrowserPluginBindings* GetBindings(NPObject* object) { 40 BrowserPluginBindings* GetBindings(NPObject* object) {
41 return static_cast<BrowserPluginBindings::BrowserPluginNPObject*>(object)-> 41 return static_cast<BrowserPluginBindings::BrowserPluginNPObject*>(object)->
42 message_channel; 42 message_channel.get();
43 } 43 }
44 44
45 std::string StringFromNPVariant(const NPVariant& variant) { 45 std::string StringFromNPVariant(const NPVariant& variant) {
46 if (!NPVARIANT_IS_STRING(variant)) 46 if (!NPVARIANT_IS_STRING(variant))
47 return std::string(); 47 return std::string();
48 const NPString& np_string = NPVARIANT_TO_STRING(variant); 48 const NPString& np_string = NPVARIANT_TO_STRING(variant);
49 return std::string(np_string.UTF8Characters, np_string.UTF8Length); 49 return std::string(np_string.UTF8Characters, np_string.UTF8Length);
50 } 50 }
51 51
52 bool StringToNPVariant(const std::string &in, NPVariant *variant) { 52 bool StringToNPVariant(const std::string &in, NPVariant *variant) {
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 for (PropertyBindingList::iterator iter = property_bindings_.begin(); 938 for (PropertyBindingList::iterator iter = property_bindings_.begin();
939 iter != property_bindings_.end(); 939 iter != property_bindings_.end();
940 ++iter) { 940 ++iter) {
941 if ((*iter)->MatchesName(name)) 941 if ((*iter)->MatchesName(name))
942 return (*iter)->GetProperty(this, result); 942 return (*iter)->GetProperty(this, result);
943 } 943 }
944 return false; 944 return false;
945 } 945 }
946 946
947 } // namespace content 947 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/renderer/browser_plugin/browser_plugin_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698