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

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

Issue 11189146: Eliminate implicit conversion from scoped_refptr<T> to T* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « webkit/plugins/ppapi/host_globals.h ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/logging.h" 9 #include "base/logging.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 ::ppapi::ResourceTracker* HostGlobals::GetResourceTracker() { 58 ::ppapi::ResourceTracker* HostGlobals::GetResourceTracker() {
59 return &resource_tracker_; 59 return &resource_tracker_;
60 } 60 }
61 61
62 ::ppapi::VarTracker* HostGlobals::GetVarTracker() { 62 ::ppapi::VarTracker* HostGlobals::GetVarTracker() {
63 return &host_var_tracker_; 63 return &host_var_tracker_;
64 } 64 }
65 65
66 ::ppapi::CallbackTracker* HostGlobals::GetCallbackTrackerForInstance( 66 scoped_refptr< ::ppapi::CallbackTracker>
67 PP_Instance instance) { 67 HostGlobals::GetCallbackTrackerForInstance(PP_Instance instance) {
68 std::map<PP_Instance, linked_ptr<InstanceData> >::iterator found = 68 std::map<PP_Instance, linked_ptr<InstanceData> >::iterator found =
69 instance_map_.find(instance); 69 instance_map_.find(instance);
70 if (found == instance_map_.end()) 70 if (found == instance_map_.end())
71 return NULL; 71 return scoped_refptr< ::ppapi::CallbackTracker>;
72 72
73 return found->second->instance->module()->GetCallbackTracker(); 73 return found->second->instance->module()->GetCallbackTracker();
74 } 74 }
75 75
76 ::ppapi::FunctionGroupBase* HostGlobals::GetFunctionAPI(PP_Instance pp_instance, 76 ::ppapi::FunctionGroupBase* HostGlobals::GetFunctionAPI(PP_Instance pp_instance,
77 ::ppapi::ApiID id) { 77 ::ppapi::ApiID id) {
78 // Get the instance object. This also ensures that the instance data is in 78 // Get the instance object. This also ensures that the instance data is in
79 // the map, since we need it below. 79 // the map, since we need it below.
80 PluginInstance* instance = GetInstance(pp_instance); 80 PluginInstance* instance = GetInstance(pp_instance);
81 if (!instance) 81 if (!instance)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 return NULL; 206 return NULL;
207 return found->second->instance; 207 return found->second->instance;
208 } 208 }
209 209
210 bool HostGlobals::IsHostGlobals() const { 210 bool HostGlobals::IsHostGlobals() const {
211 return true; 211 return true;
212 } 212 }
213 213
214 } // namespace ppapi 214 } // namespace ppapi
215 } // namespace webkit 215 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/host_globals.h ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698