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

Side by Side Diff: ppapi/proxy/ppb_url_request_info_proxy.cc

Issue 7655002: Convert the pp::proxy namespace to the ppapi::proxy namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "ppapi/proxy/ppb_url_request_info_proxy.h" 5 #include "ppapi/proxy/ppb_url_request_info_proxy.h"
6 6
7 #include "ppapi/c/ppb_url_request_info.h" 7 #include "ppapi/c/ppb_url_request_info.h"
8 #include "ppapi/proxy/enter_proxy.h" 8 #include "ppapi/proxy/enter_proxy.h"
9 #include "ppapi/proxy/plugin_dispatcher.h" 9 #include "ppapi/proxy/plugin_dispatcher.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
11 #include "ppapi/thunk/ppb_url_request_info_api.h" 11 #include "ppapi/thunk/ppb_url_request_info_api.h"
12 #include "ppapi/thunk/resource_creation_api.h" 12 #include "ppapi/thunk/resource_creation_api.h"
13 #include "ppapi/thunk/thunk.h" 13 #include "ppapi/thunk/thunk.h"
14 14
15 using ppapi::HostResource;
16 using ppapi::Resource;
17 using ppapi::thunk::EnterFunctionNoLock; 15 using ppapi::thunk::EnterFunctionNoLock;
18 using ppapi::thunk::PPB_URLRequestInfo_API; 16 using ppapi::thunk::PPB_URLRequestInfo_API;
19 using ppapi::thunk::ResourceCreationAPI; 17 using ppapi::thunk::ResourceCreationAPI;
20 18
21 namespace pp { 19 namespace ppapi {
22 namespace proxy { 20 namespace proxy {
23 21
24 namespace { 22 namespace {
25 23
26 InterfaceProxy* CreateURLRequestInfoProxy(Dispatcher* dispatcher, 24 InterfaceProxy* CreateURLRequestInfoProxy(Dispatcher* dispatcher,
27 const void* target_interface) { 25 const void* target_interface) {
28 return new PPB_URLRequestInfo_Proxy(dispatcher, target_interface); 26 return new PPB_URLRequestInfo_Proxy(dispatcher, target_interface);
29 } 27 }
30 28
31 } // namespace 29 } // namespace
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const void* target_interface) 113 const void* target_interface)
116 : InterfaceProxy(dispatcher, target_interface) { 114 : InterfaceProxy(dispatcher, target_interface) {
117 } 115 }
118 116
119 PPB_URLRequestInfo_Proxy::~PPB_URLRequestInfo_Proxy() { 117 PPB_URLRequestInfo_Proxy::~PPB_URLRequestInfo_Proxy() {
120 } 118 }
121 119
122 // static 120 // static
123 const InterfaceProxy::Info* PPB_URLRequestInfo_Proxy::GetInfo() { 121 const InterfaceProxy::Info* PPB_URLRequestInfo_Proxy::GetInfo() {
124 static const Info info = { 122 static const Info info = {
125 ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk(), 123 thunk::GetPPB_URLRequestInfo_Thunk(),
126 PPB_URLREQUESTINFO_INTERFACE, 124 PPB_URLREQUESTINFO_INTERFACE,
127 INTERFACE_ID_PPB_URL_REQUEST_INFO, 125 INTERFACE_ID_PPB_URL_REQUEST_INFO,
128 false, 126 false,
129 &CreateURLRequestInfoProxy, 127 &CreateURLRequestInfoProxy,
130 }; 128 };
131 return &info; 129 return &info;
132 } 130 }
133 131
134 // static 132 // static
135 PP_Resource PPB_URLRequestInfo_Proxy::CreateProxyResource( 133 PP_Resource PPB_URLRequestInfo_Proxy::CreateProxyResource(
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 double expected_last_modified_time) { 197 double expected_last_modified_time) {
200 EnterHostFromHostResource<PPB_URLRequestInfo_API> enter(request); 198 EnterHostFromHostResource<PPB_URLRequestInfo_API> enter(request);
201 if (enter.succeeded()) { 199 if (enter.succeeded()) {
202 enter.object()->AppendFileToBody( 200 enter.object()->AppendFileToBody(
203 file_ref.host_resource(), start_offset, number_of_bytes, 201 file_ref.host_resource(), start_offset, number_of_bytes,
204 expected_last_modified_time); 202 expected_last_modified_time);
205 } 203 }
206 } 204 }
207 205
208 } // namespace proxy 206 } // namespace proxy
209 } // namespace pp 207 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698