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

Unified Diff: chrome/renderer/chrome_ppb_pdf_impl.cc

Issue 8342016: Revert 106142 - Add a new globals object for PPAPI tracking information. (Closed) Base URL: svn://svn.chromium.org/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/ppapi_plugin/ppapi_thread.h » ('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 106146)
+++ chrome/renderer/chrome_ppb_pdf_impl.cc (working copy)
@@ -29,15 +29,12 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "unicode/usearch.h"
-#include "webkit/plugins/ppapi/host_globals.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/ppb_image_data_impl.h"
#include "webkit/plugins/ppapi/resource_tracker.h"
-using ppapi::PpapiGlobals;
-using webkit::ppapi::HostGlobals;
using WebKit::WebView;
using content::RenderThread;
@@ -126,7 +123,7 @@
PP_Var GetLocalizedString(PP_Instance instance_id,
PP_ResourceString string_id) {
webkit::ppapi::PluginInstance* instance =
- HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id);
+ webkit::ppapi::ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
return PP_MakeUndefined();
@@ -162,7 +159,7 @@
ResourceBundle::GetSharedInstance().GetBitmapNamed(res_id);
// Validate the instance.
- if (!HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id))
+ if (!webkit::ppapi::ResourceTracker::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 +187,7 @@
PP_PrivateFontCharset charset) {
#if defined(OS_LINUX)
// Validate the instance before using it below.
- if (!HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id))
+ if (!webkit::ppapi::ResourceTracker::Get()->GetInstance(instance_id))
return 0;
scoped_refptr<ppapi::StringVar> face_name(ppapi::StringVar::FromPPVar(
@@ -222,7 +219,7 @@
uint32_t* output_length) {
#if defined(OS_LINUX)
ppapi::Resource* resource =
- PpapiGlobals::Get()->GetResourceTracker()->GetResource(font_file);
+ ppapi::TrackerBase::Get()->GetResourceTracker()->GetResource(font_file);
if (!resource)
return false;
@@ -285,7 +282,7 @@
void DidStartLoading(PP_Instance instance_id) {
webkit::ppapi::PluginInstance* instance =
- HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id);
+ webkit::ppapi::ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
return;
instance->delegate()->DidStartLoading();
@@ -293,7 +290,7 @@
void DidStopLoading(PP_Instance instance_id) {
webkit::ppapi::PluginInstance* instance =
- HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id);
+ webkit::ppapi::ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
return;
instance->delegate()->DidStopLoading();
@@ -301,7 +298,7 @@
void SetContentRestriction(PP_Instance instance_id, int restrictions) {
webkit::ppapi::PluginInstance* instance =
- HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id);
+ webkit::ppapi::ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
return;
instance->delegate()->SetContentRestriction(restrictions);
@@ -320,7 +317,7 @@
void HasUnsupportedFeature(PP_Instance instance_id) {
webkit::ppapi::PluginInstance* instance =
- HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id);
+ webkit::ppapi::ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
return;
@@ -336,7 +333,7 @@
void SaveAs(PP_Instance instance_id) {
webkit::ppapi::PluginInstance* instance =
- HostGlobals::Get()->host_resource_tracker()->GetInstance(instance_id);
+ webkit::ppapi::ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
return;
instance->delegate()->SaveURLAs(instance->plugin_url());
« no previous file with comments | « no previous file | content/ppapi_plugin/ppapi_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698