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

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

Issue 7621070: Merge the plugin and impl side of the audio config and input event resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile issues Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/resource_tracker.h" 5 #include "webkit/plugins/ppapi/resource_tracker.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 ::ppapi::VarTracker* ResourceTracker::GetVarTracker() { 159 ::ppapi::VarTracker* ResourceTracker::GetVarTracker() {
160 return &var_tracker_; 160 return &var_tracker_;
161 } 161 }
162 162
163 ::ppapi::ResourceTracker* ResourceTracker::GetResourceTracker() { 163 ::ppapi::ResourceTracker* ResourceTracker::GetResourceTracker() {
164 return this; 164 return this;
165 } 165 }
166 166
167 PP_Module ResourceTracker::GetModuleForInstance(PP_Instance instance) {
168 PluginInstance* inst = GetInstance(instance);
169 if (!inst)
170 return 0;
171 return inst->module()->pp_module();
172 }
173
167 void ResourceTracker::AddNPObjectVar(NPObjectVar* object_var) { 174 void ResourceTracker::AddNPObjectVar(NPObjectVar* object_var) {
168 DCHECK(instance_map_.find(object_var->pp_instance()) != instance_map_.end()); 175 DCHECK(instance_map_.find(object_var->pp_instance()) != instance_map_.end());
169 InstanceData& data = *instance_map_[object_var->pp_instance()].get(); 176 InstanceData& data = *instance_map_[object_var->pp_instance()].get();
170 177
171 DCHECK(data.np_object_to_object_var.find(object_var->np_object()) == 178 DCHECK(data.np_object_to_object_var.find(object_var->np_object()) ==
172 data.np_object_to_object_var.end()) << "NPObjectVar already in map"; 179 data.np_object_to_object_var.end()) << "NPObjectVar already in map";
173 data.np_object_to_object_var[object_var->np_object()] = object_var; 180 data.np_object_to_object_var[object_var->np_object()] = object_var;
174 } 181 }
175 182
176 void ResourceTracker::RemoveNPObjectVar(NPObjectVar* object_var) { 183 void ResourceTracker::RemoveNPObjectVar(NPObjectVar* object_var) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 305
299 // static 306 // static
300 void ResourceTracker::ClearSingletonOverride() { 307 void ResourceTracker::ClearSingletonOverride() {
301 DCHECK(singleton_override_); 308 DCHECK(singleton_override_);
302 singleton_override_ = NULL; 309 singleton_override_ = NULL;
303 } 310 }
304 311
305 } // namespace ppapi 312 } // namespace ppapi
306 } // namespace webkit 313 } // namespace webkit
307 314
OLDNEW
« ppapi/shared_impl/audio_config_impl.h ('K') | « webkit/plugins/ppapi/resource_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698