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

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

Issue 7669055: Remove webkit::ppapi::Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nulls auditeed 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
« no previous file with comments | « webkit/plugins/ppapi/ppb_url_response_info_impl.h ('k') | webkit/plugins/ppapi/ppb_video_capture_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_url_response_info_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_url_response_info_impl.cc b/webkit/plugins/ppapi/ppb_url_response_info_impl.cc
index b1ec1fdadbf72386d0d2671e0c3ac726fb05172b..fa35c0d2fa2b1126aec8735834f4754fd81f3681 100644
--- a/webkit/plugins/ppapi/ppb_url_response_info_impl.cc
+++ b/webkit/plugins/ppapi/ppb_url_response_info_impl.cc
@@ -15,6 +15,7 @@
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
+#include "webkit/plugins/ppapi/resource_helper.h"
#include "webkit/glue/webkit_glue.h"
using ppapi::StringVar;
@@ -50,7 +51,7 @@ bool IsRedirect(int32_t status) {
} // namespace
-PPB_URLResponseInfo_Impl::PPB_URLResponseInfo_Impl(PluginInstance* instance)
+PPB_URLResponseInfo_Impl::PPB_URLResponseInfo_Impl(PP_Instance instance)
: Resource(instance),
status_code_(-1) {
}
@@ -73,7 +74,7 @@ bool PPB_URLResponseInfo_Impl::Initialize(const WebURLResponse& response) {
WebString file_path = response.downloadFilePath();
if (!file_path.isEmpty()) {
- body_ = new PPB_FileRef_Impl(instance(),
+ body_ = new PPB_FileRef_Impl(pp_instance(),
webkit_glue::WebStringToFilePath(file_path));
}
return true;
@@ -84,7 +85,10 @@ PPB_URLResponseInfo_API* PPB_URLResponseInfo_Impl::AsPPB_URLResponseInfo_API() {
}
PP_Var PPB_URLResponseInfo_Impl::GetProperty(PP_URLResponseProperty property) {
- PP_Module pp_module = instance()->module()->pp_module();
+ PluginModule* plugin_module = ResourceHelper::GetPluginModule(this);
+ if (!plugin_module)
+ return PP_MakeUndefined();
+ PP_Module pp_module = plugin_module->pp_module();
switch (property) {
case PP_URLRESPONSEPROPERTY_URL:
return StringVar::StringToPPVar(pp_module, url_);
« no previous file with comments | « webkit/plugins/ppapi/ppb_url_response_info_impl.h ('k') | webkit/plugins/ppapi/ppb_video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698