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

Unified Diff: ppapi/proxy/ppb_flash_file_proxy.cc

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 4 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
Index: ppapi/proxy/ppb_flash_file_proxy.cc
diff --git a/ppapi/proxy/ppb_flash_file_proxy.cc b/ppapi/proxy/ppb_flash_file_proxy.cc
index 73e8a2d8ed0801a377f87980714e04f998c2fb4e..9400728341fa417c223d6dc2ea3b9138890db349 100644
--- a/ppapi/proxy/ppb_flash_file_proxy.cc
+++ b/ppapi/proxy/ppb_flash_file_proxy.cc
@@ -20,10 +20,12 @@
#include "ppapi/c/pp_file_info.h"
#include "ppapi/c/private/ppb_flash_file.h"
#include "ppapi/proxy/plugin_dispatcher.h"
-#include "ppapi/proxy/plugin_resource.h"
+#include "ppapi/proxy/plugin_resource_tracker.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/shared_impl/resource.h"
using ppapi::HostResource;
+using ppapi::Resource;
namespace pp {
namespace proxy {
@@ -625,13 +627,12 @@ namespace {
int32_t OpenFileRefFile(PP_Resource file_ref_id,
int32_t mode,
PP_FileHandle* file) {
- PluginResource* file_ref =
- PluginResourceTracker::GetInstance()->GetResourceObject(file_ref_id);
+ Resource* file_ref =
+ PluginResourceTracker::GetInstance()->GetResource(file_ref_id);
if (!file_ref)
return PP_ERROR_BADRESOURCE;
- PluginDispatcher* dispatcher =
- PluginDispatcher::GetForInstance(file_ref->instance());
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForResource(file_ref);
if (!dispatcher)
return PP_ERROR_BADARGUMENT;
@@ -646,13 +647,12 @@ int32_t OpenFileRefFile(PP_Resource file_ref_id,
int32_t QueryFileRefFile(PP_Resource file_ref_id,
PP_FileInfo* info) {
- PluginResource* file_ref =
- PluginResourceTracker::GetInstance()->GetResourceObject(file_ref_id);
+ Resource* file_ref =
+ PluginResourceTracker::GetInstance()->GetResource(file_ref_id);
if (!file_ref)
return PP_ERROR_BADRESOURCE;
- PluginDispatcher* dispatcher =
- PluginDispatcher::GetForInstance(file_ref->instance());
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForResource(file_ref);
if (!dispatcher)
return PP_ERROR_BADARGUMENT;

Powered by Google App Engine
This is Rietveld 408576698