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

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

Issue 8344025: Add a new globals object for PPAPI tracking information. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/quota_file_io.cc ('k') | webkit/plugins/ppapi/resource_tracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Deleted: svn:mergeinfo
Reverse-merged /branches/chrome_webkit_merge_branch/src/webkit/plugins/ppapi/resource_helper.cc:r3734-4217,4606-5108,5177-5263
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/plugins/ppapi/resource_helper.h" 5 #include "webkit/plugins/ppapi/resource_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/shared_impl/resource.h" 8 #include "ppapi/shared_impl/resource.h"
9 #include "webkit/plugins/ppapi/host_globals.h"
9 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
10 #include "webkit/plugins/ppapi/plugin_module.h" 11 #include "webkit/plugins/ppapi/plugin_module.h"
11 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 12 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
12 #include "webkit/plugins/ppapi/resource_tracker.h" 13 #include "webkit/plugins/ppapi/resource_tracker.h"
13 14
14 namespace webkit { 15 namespace webkit {
15 namespace ppapi { 16 namespace ppapi {
16 17
17 // static 18 // static
18 PluginInstance* ResourceHelper::GetPluginInstance( 19 PluginInstance* ResourceHelper::GetPluginInstance(
19 const ::ppapi::Resource* resource) { 20 const ::ppapi::Resource* resource) {
20 ResourceTracker* tracker = ResourceTracker::Get(); 21 ResourceTracker* tracker = HostGlobals::Get()->host_resource_tracker();
21 return tracker->GetInstance(resource->pp_instance()); 22 return tracker->GetInstance(resource->pp_instance());
22 } 23 }
23 24
24 PluginModule* ResourceHelper::GetPluginModule( 25 PluginModule* ResourceHelper::GetPluginModule(
25 const ::ppapi::Resource* resource) { 26 const ::ppapi::Resource* resource) {
26 PluginInstance* instance = GetPluginInstance(resource); 27 PluginInstance* instance = GetPluginInstance(resource);
27 return instance ? instance->module() : NULL; 28 return instance ? instance->module() : NULL;
28 } 29 }
29 30
30 PluginDelegate* ResourceHelper::GetPluginDelegate( 31 PluginDelegate* ResourceHelper::GetPluginDelegate(
31 const ::ppapi::Resource* resource) { 32 const ::ppapi::Resource* resource) {
32 PluginInstance* instance = GetPluginInstance(resource); 33 PluginInstance* instance = GetPluginInstance(resource);
33 return instance ? instance->delegate() : NULL; 34 return instance ? instance->delegate() : NULL;
34 } 35 }
35 36
36 } // namespace ppapi 37 } // namespace ppapi
37 } // namespace webkit 38 } // namespace webkit
38 39
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/quota_file_io.cc ('k') | webkit/plugins/ppapi/resource_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698