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

Unified Diff: webkit/plugins/ppapi/ppb_flash_impl.cc

Issue 7206016: Convert most remaining resources to use the API/thunk system. The significant (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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: webkit/plugins/ppapi/ppb_flash_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_flash_impl.cc (revision 89610)
+++ webkit/plugins/ppapi/ppb_flash_impl.cc (working copy)
@@ -10,6 +10,7 @@
#include "base/time.h"
#include "googleurl/src/gurl.h"
#include "ppapi/c/private/ppb_flash.h"
+#include "ppapi/thunk/enter.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/ppapi/plugin_module.h"
@@ -18,6 +19,9 @@
#include "webkit/plugins/ppapi/resource_tracker.h"
#include "webkit/plugins/ppapi/var.h"
+using ppapi::thunk::EnterResource;
+using ppapi::thunk::PPB_URLRequestInfo_API;
+
namespace webkit {
namespace ppapi {
@@ -48,10 +52,11 @@
int32_t Navigate(PP_Resource request_id,
const char* target,
bool from_user_action) {
- scoped_refptr<PPB_URLRequestInfo_Impl> request(
- Resource::GetAs<PPB_URLRequestInfo_Impl>(request_id));
- if (!request)
+ EnterResource<PPB_URLRequestInfo_API> enter(request_id, true);
+ if (enter.failed())
return PP_ERROR_BADRESOURCE;
+ PPB_URLRequestInfo_Impl* request =
+ static_cast<PPB_URLRequestInfo_Impl*>(enter.object());
if (!target)
return PP_ERROR_BADARGUMENT;

Powered by Google App Engine
This is Rietveld 408576698