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

Unified Diff: webkit/glue/plugins/pepper_url_loader.cc

Issue 4310002: Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/glue/plugins/pepper_transport.cc ('k') | webkit/glue/plugins/pepper_url_request_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_url_loader.cc
===================================================================
--- webkit/glue/plugins/pepper_url_loader.cc (revision 65116)
+++ webkit/glue/plugins/pepper_url_loader.cc (working copy)
@@ -19,6 +19,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
#include "webkit/appcache/web_application_cache_host_impl.h"
+#include "webkit/glue/plugins/pepper_common.h"
#include "webkit/glue/plugins/pepper_plugin_instance.h"
#include "webkit/glue/plugins/pepper_url_request_info.h"
#include "webkit/glue/plugins/pepper_url_response_info.h"
@@ -50,8 +51,8 @@
return loader->GetReference();
}
-bool IsURLLoader(PP_Resource resource) {
- return !!Resource::GetAs<URLLoader>(resource);
+PP_Bool IsURLLoader(PP_Resource resource) {
+ return BoolToPPBool(!!Resource::GetAs<URLLoader>(resource));
}
int32_t Open(PP_Resource loader_id,
@@ -78,24 +79,26 @@
return loader->FollowRedirect(callback);
}
-bool GetUploadProgress(PP_Resource loader_id,
+PP_Bool GetUploadProgress(PP_Resource loader_id,
int64_t* bytes_sent,
int64_t* total_bytes_to_be_sent) {
scoped_refptr<URLLoader> loader(Resource::GetAs<URLLoader>(loader_id));
if (!loader)
- return false;
- return loader->GetUploadProgress(bytes_sent, total_bytes_to_be_sent);
- return true;
+ return PP_FALSE;
+
+ return BoolToPPBool(loader->GetUploadProgress(bytes_sent,
+ total_bytes_to_be_sent));
}
-bool GetDownloadProgress(PP_Resource loader_id,
- int64_t* bytes_received,
- int64_t* total_bytes_to_be_received) {
+PP_Bool GetDownloadProgress(PP_Resource loader_id,
+ int64_t* bytes_received,
+ int64_t* total_bytes_to_be_received) {
scoped_refptr<URLLoader> loader(Resource::GetAs<URLLoader>(loader_id));
if (!loader)
- return false;
- return loader->GetDownloadProgress(bytes_received,
- total_bytes_to_be_received);
+ return PP_FALSE;
+
+ return BoolToPPBool(loader->GetDownloadProgress(bytes_received,
+ total_bytes_to_be_received));
}
PP_Resource GetResponseInfo(PP_Resource loader_id) {
« no previous file with comments | « webkit/glue/plugins/pepper_transport.cc ('k') | webkit/glue/plugins/pepper_url_request_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698