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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 "webkit/plugins/ppapi/host_globals.h" 5 #include "webkit/plugins/ppapi/host_globals.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 ::ppapi::VarTracker* HostGlobals::GetVarTracker() { 101 ::ppapi::VarTracker* HostGlobals::GetVarTracker() {
102 return &host_var_tracker_; 102 return &host_var_tracker_;
103 } 103 }
104 104
105 ::ppapi::CallbackTracker* HostGlobals::GetCallbackTrackerForInstance( 105 ::ppapi::CallbackTracker* HostGlobals::GetCallbackTrackerForInstance(
106 PP_Instance instance) { 106 PP_Instance instance) {
107 InstanceMap::iterator found = instance_map_.find(instance); 107 InstanceMap::iterator found = instance_map_.find(instance);
108 if (found == instance_map_.end()) 108 if (found == instance_map_.end())
109 return NULL; 109 return NULL;
110 return found->second->module()->GetCallbackTracker(); 110 return found->second->module()->GetCallbackTracker().get();
111 } 111 }
112 112
113 ::ppapi::thunk::PPB_Instance_API* HostGlobals::GetInstanceAPI( 113 ::ppapi::thunk::PPB_Instance_API* HostGlobals::GetInstanceAPI(
114 PP_Instance instance) { 114 PP_Instance instance) {
115 // The InstanceAPI is just implemented by the PluginInstance object. 115 // The InstanceAPI is just implemented by the PluginInstance object.
116 return GetInstance(instance); 116 return GetInstance(instance);
117 } 117 }
118 118
119 ::ppapi::thunk::ResourceCreationAPI* HostGlobals::GetResourceCreationAPI( 119 ::ppapi::thunk::ResourceCreationAPI* HostGlobals::GetResourceCreationAPI(
120 PP_Instance pp_instance) { 120 PP_Instance pp_instance) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 return NULL; 266 return NULL;
267 return found->second; 267 return found->second;
268 } 268 }
269 269
270 bool HostGlobals::IsHostGlobals() const { 270 bool HostGlobals::IsHostGlobals() const {
271 return true; 271 return true;
272 } 272 }
273 273
274 } // namespace ppapi 274 } // namespace ppapi
275 } // namespace webkit 275 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/glue/resource_request_body_unittest.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698