| OLD | NEW | 
|   1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |   1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
|   2 // Use of this source code is governed by a BSD-style license that can be |   2 // Use of this source code is governed by a BSD-style license that can be | 
|   3 // found in the LICENSE file. |   3 // found in the LICENSE file. | 
|   4  |   4  | 
|   5 #ifndef PPAPI_PROXY_URL_REQUEST_INFO_RESOURCE_H_ |   5 #ifndef PPAPI_PROXY_URL_REQUEST_INFO_RESOURCE_H_ | 
|   6 #define PPAPI_PROXY_URL_REQUEST_INFO_RESOURCE_H_ |   6 #define PPAPI_PROXY_URL_REQUEST_INFO_RESOURCE_H_ | 
|   7  |   7  | 
|   8 #include "base/basictypes.h" |   8 #include "base/basictypes.h" | 
|   9 #include "base/compiler_specific.h" |   9 #include "base/compiler_specific.h" | 
|  10 #include "ppapi/proxy/plugin_resource.h" |  10 #include "ppapi/proxy/plugin_resource.h" | 
|  11 #include "ppapi/proxy/ppapi_proxy_export.h" |  11 #include "ppapi/proxy/ppapi_proxy_export.h" | 
|  12 #include "ppapi/shared_impl/url_request_info_data.h" |  12 #include "ppapi/shared_impl/url_request_info_data.h" | 
|  13 #include "ppapi/thunk/ppb_url_request_info_api.h" |  13 #include "ppapi/thunk/ppb_url_request_info_api.h" | 
|  14  |  14  | 
|  15 namespace ppapi { |  15 namespace ppapi { | 
|  16 namespace proxy { |  16 namespace proxy { | 
|  17  |  17  | 
|  18 class PPAPI_PROXY_EXPORT URLRequestInfoResource |  18 class PPAPI_PROXY_EXPORT URLRequestInfoResource | 
|  19     : public PluginResource, |  19     : public PluginResource, | 
|  20       public thunk::PPB_URLRequestInfo_API { |  20       public thunk::PPB_URLRequestInfo_API { | 
|  21  public: |  21  public: | 
|  22   URLRequestInfoResource(Connection connection, PP_Instance instance, |  22   URLRequestInfoResource(Connection connection, PP_Instance instance, | 
|  23                          const URLRequestInfoData& data); |  23                          const URLRequestInfoData& data); | 
|  24   virtual ~URLRequestInfoResource(); |  24   virtual ~URLRequestInfoResource(); | 
|  25  |  25  | 
|  26   // Resource overrides. |  26   // Resource overrides. | 
|  27   virtual thunk::PPB_URLRequestInfo_API* AsPPB_URLRequestInfo_API() OVERRIDE; |  27   virtual thunk::PPB_URLRequestInfo_API* AsPPB_URLRequestInfo_API() override; | 
|  28  |  28  | 
|  29   // PPB_URLRequestInfo_API implementation. |  29   // PPB_URLRequestInfo_API implementation. | 
|  30   virtual PP_Bool SetProperty(PP_URLRequestProperty property, |  30   virtual PP_Bool SetProperty(PP_URLRequestProperty property, | 
|  31                               PP_Var var) OVERRIDE; |  31                               PP_Var var) override; | 
|  32   virtual PP_Bool AppendDataToBody(const void* data, uint32_t len) OVERRIDE; |  32   virtual PP_Bool AppendDataToBody(const void* data, uint32_t len) override; | 
|  33   virtual PP_Bool AppendFileToBody( |  33   virtual PP_Bool AppendFileToBody( | 
|  34       PP_Resource file_ref, |  34       PP_Resource file_ref, | 
|  35       int64_t start_offset, |  35       int64_t start_offset, | 
|  36       int64_t number_of_bytes, |  36       int64_t number_of_bytes, | 
|  37       PP_Time expected_last_modified_time) OVERRIDE; |  37       PP_Time expected_last_modified_time) override; | 
|  38   virtual const URLRequestInfoData& GetData() const OVERRIDE; |  38   virtual const URLRequestInfoData& GetData() const override; | 
|  39  |  39  | 
|  40   bool SetUndefinedProperty(PP_URLRequestProperty property); |  40   bool SetUndefinedProperty(PP_URLRequestProperty property); | 
|  41   bool SetBooleanProperty(PP_URLRequestProperty property, bool value); |  41   bool SetBooleanProperty(PP_URLRequestProperty property, bool value); | 
|  42   bool SetIntegerProperty(PP_URLRequestProperty property, int32_t value); |  42   bool SetIntegerProperty(PP_URLRequestProperty property, int32_t value); | 
|  43   bool SetStringProperty(PP_URLRequestProperty property, |  43   bool SetStringProperty(PP_URLRequestProperty property, | 
|  44                          const std::string& value); |  44                          const std::string& value); | 
|  45  |  45  | 
|  46  private: |  46  private: | 
|  47   URLRequestInfoData data_; |  47   URLRequestInfoData data_; | 
|  48  |  48  | 
|  49   DISALLOW_COPY_AND_ASSIGN(URLRequestInfoResource); |  49   DISALLOW_COPY_AND_ASSIGN(URLRequestInfoResource); | 
|  50 }; |  50 }; | 
|  51  |  51  | 
|  52 }  // namespace proxy |  52 }  // namespace proxy | 
|  53 }  // namespace ppapi |  53 }  // namespace ppapi | 
|  54  |  54  | 
|  55 #endif  // PPAPI_PROXY_URL_REQUEST_INFO_RESOURCE_H_ |  55 #endif  // PPAPI_PROXY_URL_REQUEST_INFO_RESOURCE_H_ | 
| OLD | NEW |