diff options
author | dmichael@google.com <dmichael@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 14:45:44 +0000 |
---|---|---|
committer | dmichael@google.com <dmichael@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 14:45:44 +0000 |
commit | 6f2e3919c4709404d8d7b6742f9cd9989b799c98 (patch) | |
tree | 55a933f7e2988625f0f3ded5a562203c7e3921c9 /ppapi/cpp/dev/url_request_info_dev.cc | |
parent | 79ba2d8a26fe6c9b343c57fef57896a90baa3878 (diff) | |
download | chromium_src-6f2e3919c4709404d8d7b6742f9cd9989b799c98.zip chromium_src-6f2e3919c4709404d8d7b6742f9cd9989b799c98.tar.gz chromium_src-6f2e3919c4709404d8d7b6742f9cd9989b799c98.tar.bz2 |
Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on Windows). This includes changing bool to PP_Bool and adding a PP_INLINE macro.
TEST=tests/test_c_includes.c
BUG=59791,53451
The first patch set is a straight copy of http://codereview.chromium.org/4019010/show which got LGTMed when PPAPI was in its own repo, but had to be rolled back in order to include chrome changes.
IMPORTANT: This change will break plugin implementations that use the C interface, and might break others as well.
Review URL: http://codereview.chromium.org/4310002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/dev/url_request_info_dev.cc')
-rw-r--r-- | ppapi/cpp/dev/url_request_info_dev.cc | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/ppapi/cpp/dev/url_request_info_dev.cc b/ppapi/cpp/dev/url_request_info_dev.cc index faf975c5..5b4a135 100644 --- a/ppapi/cpp/dev/url_request_info_dev.cc +++ b/ppapi/cpp/dev/url_request_info_dev.cc @@ -4,6 +4,7 @@ #include "ppapi/cpp/dev/url_request_info_dev.h" +#include "ppapi/cpp/common.h" #include "ppapi/cpp/dev/file_ref_dev.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/module_impl.h" @@ -43,15 +44,17 @@ bool URLRequestInfo_Dev::SetProperty(PP_URLRequestProperty_Dev property, const Var& value) { if (!url_request_info_f) return false; - return url_request_info_f->SetProperty(pp_resource(), - property, - value.pp_var()); + return PPBoolToBool(url_request_info_f->SetProperty(pp_resource(), + property, + value.pp_var())); } bool URLRequestInfo_Dev::AppendDataToBody(const char* data, uint32_t len) { if (!url_request_info_f) return false; - return url_request_info_f->AppendDataToBody(pp_resource(), data, len); + return PPBoolToBool(url_request_info_f->AppendDataToBody(pp_resource(), + data, + len)); } bool URLRequestInfo_Dev::AppendFileToBody( @@ -59,11 +62,12 @@ bool URLRequestInfo_Dev::AppendFileToBody( PP_Time expected_last_modified_time) { if (!url_request_info_f) return false; - return url_request_info_f->AppendFileToBody(pp_resource(), - file_ref.pp_resource(), - 0, - -1, - expected_last_modified_time); + return PPBoolToBool( + url_request_info_f->AppendFileToBody(pp_resource(), + file_ref.pp_resource(), + 0, + -1, + expected_last_modified_time)); } bool URLRequestInfo_Dev::AppendFileRangeToBody( @@ -71,11 +75,12 @@ bool URLRequestInfo_Dev::AppendFileRangeToBody( int64_t start_offset, int64_t length, PP_Time expected_last_modified_time) { - return url_request_info_f->AppendFileToBody(pp_resource(), - file_ref.pp_resource(), - start_offset, - length, - expected_last_modified_time); + return PPBoolToBool( + url_request_info_f->AppendFileToBody(pp_resource(), + file_ref.pp_resource(), + start_offset, + length, + expected_last_modified_time)); } } // namespace pp |