diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 16:58:25 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 16:58:25 +0000 |
commit | e14c959126431fed79d444f5d33c3bd508b20663 (patch) | |
tree | da195fe3316022299b88fce805210deb19c0d270 /chrome/renderer | |
parent | 5369c1613d344187df6ed2167094435fe04da200 (diff) | |
download | chromium_src-e14c959126431fed79d444f5d33c3bd508b20663.zip chromium_src-e14c959126431fed79d444f5d33c3bd508b20663.tar.gz chromium_src-e14c959126431fed79d444f5d33c3bd508b20663.tar.bz2 |
Start splitting out WebUI into an implementation class and an interface that each page implements. This first patch moves the virtual functions in WebUI that were overridden by pages into a separate interface, content::WebUIController.
BUG=98716
Review URL: http://codereview.chromium.org/9188056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117645 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/chrome_ppb_pdf_impl.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/chrome/renderer/chrome_ppb_pdf_impl.cc b/chrome/renderer/chrome_ppb_pdf_impl.cc index 880d8c2..ba7e127 100644 --- a/chrome/renderer/chrome_ppb_pdf_impl.cc +++ b/chrome/renderer/chrome_ppb_pdf_impl.cc @@ -9,6 +9,7 @@ #include "build/build_config.h" #include "chrome/common/render_messages.h" #include "content/public/common/child_process_sandbox_support_linux.h" +#include "content/public/common/content_client.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_view.h" #include "grit/webkit_resources.h" @@ -123,7 +124,8 @@ static const ResourceImageInfo kResourceImageMap[] = { PP_Var GetLocalizedString(PP_Instance instance_id, PP_ResourceString string_id) { - PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); + PluginInstance* instance = + content::GetHostGlobals()->GetInstance(instance_id); if (!instance) return PP_MakeUndefined(); @@ -159,7 +161,7 @@ PP_Resource GetResourceImage(PP_Instance instance_id, ResourceBundle::GetSharedInstance().GetBitmapNamed(res_id); // Validate the instance. - if (!HostGlobals::Get()->GetInstance(instance_id)) + if (!content::GetHostGlobals()->GetInstance(instance_id)) return 0; scoped_refptr<webkit::ppapi::PPB_ImageData_Impl> image_data( new webkit::ppapi::PPB_ImageData_Impl(instance_id)); @@ -187,7 +189,7 @@ PP_Resource GetFontFileWithFallback( PP_PrivateFontCharset charset) { #if defined(OS_LINUX) || defined(OS_OPENBSD) // Validate the instance before using it below. - if (!HostGlobals::Get()->GetInstance(instance_id)) + if (!content::GetHostGlobals()->GetInstance(instance_id)) return 0; scoped_refptr<ppapi::StringVar> face_name(ppapi::StringVar::FromPPVar( @@ -281,21 +283,23 @@ void SearchString(PP_Instance instance, } void DidStartLoading(PP_Instance instance_id) { - PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); + PluginInstance* instance = content::GetHostGlobals()->GetInstance(instance_id); if (!instance) return; instance->delegate()->DidStartLoading(); } void DidStopLoading(PP_Instance instance_id) { - PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); + PluginInstance* instance = + content::GetHostGlobals()->GetInstance(instance_id); if (!instance) return; instance->delegate()->DidStopLoading(); } void SetContentRestriction(PP_Instance instance_id, int restrictions) { - PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); + PluginInstance* instance = + content::GetHostGlobals()->GetInstance(instance_id); if (!instance) return; instance->delegate()->SetContentRestriction(restrictions); @@ -313,7 +317,8 @@ void UserMetricsRecordAction(PP_Var action) { } void HasUnsupportedFeature(PP_Instance instance_id) { - PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); + PluginInstance* instance = + content::GetHostGlobals()->GetInstance(instance_id); if (!instance) return; @@ -328,7 +333,8 @@ void HasUnsupportedFeature(PP_Instance instance_id) { } void SaveAs(PP_Instance instance_id) { - PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); + PluginInstance* instance = + content::GetHostGlobals()->GetInstance(instance_id); if (!instance) return; instance->delegate()->SaveURLAs(instance->plugin_url()); |