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

Side by Side Diff: webkit/glue/plugins/pepper_resource_tracker.cc

Issue 4164015: Switch to the new PPAPI repository. This removes the DEPS entry that refers t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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/glue/plugins/pepper_resource_tracker.h ('k') | webkit/glue/plugins/pepper_scrollbar.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/glue/plugins/pepper_resource_tracker.h" 5 #include "webkit/glue/plugins/pepper_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"
11 #include "base/rand_util.h" 11 #include "base/rand_util.h"
12 #include "third_party/ppapi/c/pp_resource.h" 12 #include "ppapi/c/pp_resource.h"
13 #include "webkit/glue/plugins/pepper_resource.h" 13 #include "webkit/glue/plugins/pepper_resource.h"
14 14
15 namespace pepper { 15 namespace pepper {
16 16
17 scoped_refptr<Resource> ResourceTracker::GetResource(PP_Resource res) const { 17 scoped_refptr<Resource> ResourceTracker::GetResource(PP_Resource res) const {
18 ResourceMap::const_iterator result = live_resources_.find(res); 18 ResourceMap::const_iterator result = live_resources_.find(res);
19 if (result == live_resources_.end()) { 19 if (result == live_resources_.end()) {
20 return scoped_refptr<Resource>(); 20 return scoped_refptr<Resource>();
21 } 21 }
22 return result->second.first; 22 return result->second.first;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 PluginModule* ResourceTracker::GetModule(PP_Module module) { 150 PluginModule* ResourceTracker::GetModule(PP_Module module) {
151 ModuleMap::iterator found = module_map_.find(module); 151 ModuleMap::iterator found = module_map_.find(module);
152 if (found == module_map_.end()) 152 if (found == module_map_.end())
153 return NULL; 153 return NULL;
154 return found->second; 154 return found->second;
155 } 155 }
156 156
157 } // namespace pepper 157 } // namespace pepper
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_resource_tracker.h ('k') | webkit/glue/plugins/pepper_scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698