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

Unified Diff: ppapi/proxy/ppb_url_loader_proxy.cc

Issue 11094060: Exclude host-side code from the NaCl IRT proxy build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « ppapi/proxy/ppb_instance_proxy.cc ('k') | ppapi/proxy/ppb_url_response_info_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_url_loader_proxy.cc
===================================================================
--- ppapi/proxy/ppb_url_loader_proxy.cc (revision 167150)
+++ ppapi/proxy/ppb_url_loader_proxy.cc (working copy)
@@ -48,6 +48,7 @@
// asked for a larger buffer.
const int32_t kMaxReadBufferSize = 16777216; // 16MB
+#if !defined(OS_NACL)
// Called in the renderer when the byte counts have changed. We send a message
// to the plugin to synchronize its counts so it can respond to status polls
// from the plugin.
@@ -57,7 +58,6 @@
int64 total_bytes_to_be_sent,
int64 bytes_received,
int64 total_bytes_to_be_received) {
-#if !defined(OS_NACL)
Dispatcher* dispatcher = HostDispatcher::GetForInstance(pp_instance);
if (!dispatcher)
return;
@@ -71,8 +71,8 @@
params.total_bytes_to_be_received = total_bytes_to_be_received;
dispatcher->Send(new PpapiMsg_PPBURLLoader_UpdateProgress(
API_ID_PPB_URL_LOADER, params));
-#endif
}
+#endif // !defined(OS_NACL)
InterfaceProxy* CreateURLLoaderProxy(Dispatcher* dispatcher) {
return new PPB_URLLoader_Proxy(dispatcher);
@@ -412,6 +412,7 @@
bool PPB_URLLoader_Proxy::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(PPB_URLLoader_Proxy, msg)
+#if !defined(OS_NACL)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_Create,
OnMsgCreate)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_Open,
@@ -428,6 +429,8 @@
OnMsgClose)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLLoader_GrantUniversalAccess,
OnMsgGrantUniversalAccess)
+#endif // !defined(OS_NACL)
+
IPC_MESSAGE_HANDLER(PpapiMsg_PPBURLLoader_UpdateProgress,
OnMsgUpdateProgress)
IPC_MESSAGE_HANDLER(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack,
@@ -440,6 +443,7 @@
return handled;
}
+#if !defined(OS_NACL)
void PPB_URLLoader_Proxy::PrepareURLLoaderForSendingToPlugin(
PP_Resource resource) {
// So the plugin can query load status, we need to register our status
@@ -553,6 +557,7 @@
if (enter.succeeded())
enter.object()->GrantUniversalAccess();
}
+#endif // !defined(OS_NACL)
// Called in the Plugin.
void PPB_URLLoader_Proxy::OnMsgUpdateProgress(
@@ -602,6 +607,7 @@
static_cast<URLLoader*>(enter.object())->CallbackComplete(result);
}
+#if !defined(OS_NACL)
void PPB_URLLoader_Proxy::OnReadCallback(int32_t result,
IPC::Message* message) {
int32_t bytes_read = 0;
@@ -619,6 +625,7 @@
dispatcher()->Send(new PpapiMsg_PPBURLLoader_CallbackComplete(
API_ID_PPB_URL_LOADER, resource, result));
}
+#endif // !defined(OS_NACL)
} // namespace proxy
} // namespace ppapi
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.cc ('k') | ppapi/proxy/ppb_url_response_info_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698