diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-20 22:51:01 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-20 22:51:01 +0000 |
commit | 2f59e3827f5bf5dc1cad0a0a393feef965abc6bc (patch) | |
tree | 156a9acb7570a78e31256f03726bd0b8984c8f3e /chrome/renderer/chrome_ppb_pdf_impl.cc | |
parent | 7969c78bba2a31c8b50f4e19e497bf81694f6388 (diff) | |
download | chromium_src-2f59e3827f5bf5dc1cad0a0a393feef965abc6bc.zip chromium_src-2f59e3827f5bf5dc1cad0a0a393feef965abc6bc.tar.gz chromium_src-2f59e3827f5bf5dc1cad0a0a393feef965abc6bc.tar.bz2 |
Remove TrackerBase.
Fold the methods it provided into the PpapiGlobals base class. Move the
instance and module tracking in the webkit/plugins/ppapi dir out of the
HostResourceTracker (since it has nothing to do with resources) and into the
HostGlobals object (which provides general global object tracking).
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/8335001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/chrome_ppb_pdf_impl.cc')
-rw-r--r-- | chrome/renderer/chrome_ppb_pdf_impl.cc | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/chrome/renderer/chrome_ppb_pdf_impl.cc b/chrome/renderer/chrome_ppb_pdf_impl.cc index cba3ac8..21e3a3e 100644 --- a/chrome/renderer/chrome_ppb_pdf_impl.cc +++ b/chrome/renderer/chrome_ppb_pdf_impl.cc @@ -17,7 +17,6 @@ #include "ppapi/c/private/ppb_pdf.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/shared_impl/resource_tracker.h" -#include "ppapi/shared_impl/tracker_base.h" #include "ppapi/shared_impl/var.h" #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" @@ -38,6 +37,7 @@ using ppapi::PpapiGlobals; using webkit::ppapi::HostGlobals; +using webkit::ppapi::PluginInstance; using WebKit::WebView; using content::RenderThread; @@ -125,8 +125,7 @@ static const ResourceImageInfo kResourceImageMap[] = { PP_Var GetLocalizedString(PP_Instance instance_id, PP_ResourceString string_id) { - webkit::ppapi::PluginInstance* instance = - HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id); + PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); if (!instance) return PP_MakeUndefined(); @@ -162,7 +161,7 @@ PP_Resource GetResourceImage(PP_Instance instance_id, ResourceBundle::GetSharedInstance().GetBitmapNamed(res_id); // Validate the instance. - if (!HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id)) + if (!HostGlobals::Get()->GetInstance(instance_id)) return 0; scoped_refptr<webkit::ppapi::PPB_ImageData_Impl> image_data( new webkit::ppapi::PPB_ImageData_Impl(instance_id)); @@ -190,7 +189,7 @@ PP_Resource GetFontFileWithFallback( PP_PrivateFontCharset charset) { #if defined(OS_LINUX) // Validate the instance before using it below. - if (!HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id)) + if (!HostGlobals::Get()->GetInstance(instance_id)) return 0; scoped_refptr<ppapi::StringVar> face_name(ppapi::StringVar::FromPPVar( @@ -284,24 +283,21 @@ void SearchString(PP_Instance instance, } void DidStartLoading(PP_Instance instance_id) { - webkit::ppapi::PluginInstance* instance = - HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id); + PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); if (!instance) return; instance->delegate()->DidStartLoading(); } void DidStopLoading(PP_Instance instance_id) { - webkit::ppapi::PluginInstance* instance = - HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id); + PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); if (!instance) return; instance->delegate()->DidStopLoading(); } void SetContentRestriction(PP_Instance instance_id, int restrictions) { - webkit::ppapi::PluginInstance* instance = - HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id); + PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); if (!instance) return; instance->delegate()->SetContentRestriction(restrictions); @@ -319,8 +315,7 @@ void UserMetricsRecordAction(PP_Var action) { } void HasUnsupportedFeature(PP_Instance instance_id) { - webkit::ppapi::PluginInstance* instance = - HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id); + PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); if (!instance) return; @@ -335,8 +330,7 @@ void HasUnsupportedFeature(PP_Instance instance_id) { } void SaveAs(PP_Instance instance_id) { - webkit::ppapi::PluginInstance* instance = - HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id); + PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); if (!instance) return; instance->delegate()->SaveURLAs(instance->plugin_url()); |