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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_testing.cc

Issue 9187071: Lift the 64K message size limit for postMessage to/from NativeClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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) 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 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" 5 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <new> 8 #include <new>
9 #include <vector> 9 #include <vector>
10 10
11 #include "native_client/src/include/nacl_scoped_ptr.h" 11 #include "native_client/src/include/nacl_scoped_ptr.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 struct PP_Var GetDocumentURL(PP_Instance instance, 120 struct PP_Var GetDocumentURL(PP_Instance instance,
121 struct PP_URLComponents_Dev* components) { 121 struct PP_URLComponents_Dev* components) {
122 DebugPrintf("PPB_Testing::GetDocumentURL: " 122 DebugPrintf("PPB_Testing::GetDocumentURL: "
123 "instance=%"NACL_PRIu32"\n", instance); 123 "instance=%"NACL_PRIu32"\n", instance);
124 124
125 NaClSrpcChannel* channel = GetMainSrpcChannel(); 125 NaClSrpcChannel* channel = GetMainSrpcChannel();
126 nacl_abi_size_t components_size = 126 nacl_abi_size_t components_size =
127 (components != NULL) ? kPPURLComponentsDevBytes : 0; 127 (components != NULL) ? kPPURLComponentsDevBytes : 0;
128 nacl_abi_size_t url_size = kMaxVarSize; 128 nacl_abi_size_t url_size = kMaxReturnVarSize;
129 nacl::scoped_array<char> url_bytes(new (std::nothrow) char[url_size]); 129 nacl::scoped_array<char> url_bytes(new char[url_size]);
130 if (url_bytes.get() == NULL) 130 if (url_bytes.get() == NULL)
131 return PP_MakeUndefined(); 131 return PP_MakeUndefined();
132 132
133 NaClSrpcError srpc_result = 133 NaClSrpcError srpc_result =
134 PpbTestingRpcClient::PPB_Testing_GetDocumentURL( 134 PpbTestingRpcClient::PPB_Testing_GetDocumentURL(
135 channel, 135 channel,
136 instance, 136 instance,
137 &components_size, reinterpret_cast<char*>(components), 137 &components_size, reinterpret_cast<char*>(components),
138 &url_size, url_bytes.get()); 138 &url_size, url_bytes.get());
139 139
(...skipping 29 matching lines...) Expand all
169 GetLiveObjectsForInstance, 169 GetLiveObjectsForInstance,
170 IsOutOfProcess, 170 IsOutOfProcess,
171 SimulateInputEvent, 171 SimulateInputEvent,
172 GetDocumentURL, 172 GetDocumentURL,
173 GetLiveVars 173 GetLiveVars
174 }; 174 };
175 return &testing_interface; 175 return &testing_interface;
176 } 176 }
177 177
178 } // namespace ppapi_proxy 178 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698