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

Unified Diff: chrome/renderer/chrome_ppb_pdf_impl.cc

Issue 9188056: Start splitting out WebUI into an implementation class and an interface that each page implements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.cc ('k') | content/browser/tab_contents/render_view_host_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_ppb_pdf_impl.cc
===================================================================
--- chrome/renderer/chrome_ppb_pdf_impl.cc (revision 117388)
+++ chrome/renderer/chrome_ppb_pdf_impl.cc (working copy)
@@ -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 @@
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 @@
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_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 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 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 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());
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.cc ('k') | content/browser/tab_contents/render_view_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698