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

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

Issue 7006022: Revert 87415 - Convert more interfaces to the new thunk system. This goes up to and including (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « webkit/plugins/ppapi/resource_tracker.h ('k') | no next file » | 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) 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 case pp::proxy::INTERFACE_ID_RESOURCE_CREATION: 283 case pp::proxy::INTERFACE_ID_RESOURCE_CREATION:
284 proxy.reset(new ResourceCreationImpl(instance)); 284 proxy.reset(new ResourceCreationImpl(instance));
285 break; 285 break;
286 default: 286 default:
287 NOTREACHED(); 287 NOTREACHED();
288 } 288 }
289 289
290 return proxy.get(); 290 return proxy.get();
291 } 291 }
292 292
293 PP_Instance ResourceTracker::GetInstanceForResource(PP_Resource pp_resource) {
294 scoped_refptr<Resource> resource(GetResource(pp_resource));
295 if (!resource.get())
296 return 0;
297 return resource->instance()->pp_instance();
298 }
299
300 scoped_refptr<Var> ResourceTracker::GetVar(int32 var_id) const { 293 scoped_refptr<Var> ResourceTracker::GetVar(int32 var_id) const {
301 DLOG_IF(ERROR, !CheckIdType(var_id, PP_ID_TYPE_VAR)) 294 DLOG_IF(ERROR, !CheckIdType(var_id, PP_ID_TYPE_VAR))
302 << var_id << " is not a PP_Var ID."; 295 << var_id << " is not a PP_Var ID.";
303 VarMap::const_iterator result = live_vars_.find(var_id); 296 VarMap::const_iterator result = live_vars_.find(var_id);
304 if (result == live_vars_.end()) 297 if (result == live_vars_.end())
305 return scoped_refptr<Var>(); 298 return scoped_refptr<Var>();
306 return result->second.first; 299 return result->second.first;
307 } 300 }
308 301
309 bool ResourceTracker::AddRefVar(int32 var_id) { 302 bool ResourceTracker::AddRefVar(int32 var_id) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 415
423 // static 416 // static
424 void ResourceTracker::ClearSingletonOverride() { 417 void ResourceTracker::ClearSingletonOverride() {
425 DCHECK(singleton_override_); 418 DCHECK(singleton_override_);
426 singleton_override_ = NULL; 419 singleton_override_ = NULL;
427 } 420 }
428 421
429 } // namespace ppapi 422 } // namespace ppapi
430 } // namespace webkit 423 } // namespace webkit
431 424
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/resource_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698