| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |