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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppp_input_event.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/browser_ppp_input_event.h" 5 #include "native_client/src/shared/ppapi_proxy/browser_ppp_input_event.h"
6 6
7 #include "native_client/src/include/nacl_scoped_ptr.h" 7 #include "native_client/src/include/nacl_scoped_ptr.h"
8 #include "native_client/src/include/portability.h" 8 #include "native_client/src/include/portability.h"
9 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" 9 #include "native_client/src/shared/ppapi_proxy/browser_globals.h"
10 #include "native_client/src/shared/ppapi_proxy/input_event_data.h" 10 #include "native_client/src/shared/ppapi_proxy/input_event_data.h"
11 #include "native_client/src/shared/ppapi_proxy/object_serialize.h" 11 #include "native_client/src/shared/ppapi_proxy/object_serialize.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // No default case; if any new types are added we should get a compile 79 // No default case; if any new types are added we should get a compile
80 // warning. 80 // warning.
81 } 81 }
82 // Now data and character_text have all the data we want to send to the 82 // Now data and character_text have all the data we want to send to the
83 // untrusted side. 83 // untrusted side.
84 84
85 // character_text should either be undefined or a string type. 85 // character_text should either be undefined or a string type.
86 DCHECK((character_text.type == PP_VARTYPE_UNDEFINED) || 86 DCHECK((character_text.type == PP_VARTYPE_UNDEFINED) ||
87 (character_text.type == PP_VARTYPE_STRING)); 87 (character_text.type == PP_VARTYPE_STRING));
88 // Serialize the character_text Var. 88 // Serialize the character_text Var.
89 uint32_t text_size = kMaxVarSize; 89 uint32_t text_size = 0;
90 nacl::scoped_array<char> text_bytes(Serialize(&character_text, 1, 90 nacl::scoped_array<char> text_bytes(Serialize(&character_text, 1,
91 &text_size)); 91 &text_size));
92 int32_t handled; 92 int32_t handled;
93 NaClSrpcError srpc_result = 93 NaClSrpcError srpc_result =
94 PppInputEventRpcClient::PPP_InputEvent_HandleInputEvent( 94 PppInputEventRpcClient::PPP_InputEvent_HandleInputEvent(
95 GetMainSrpcChannel(instance), 95 GetMainSrpcChannel(instance),
96 instance, 96 instance,
97 input_event, 97 input_event,
98 sizeof(data), 98 sizeof(data),
99 reinterpret_cast<char*>(&data), 99 reinterpret_cast<char*>(&data),
(...skipping 16 matching lines...) Expand all
116 } // namespace 116 } // namespace
117 117
118 const PPP_InputEvent* BrowserInputEvent::GetInterface() { 118 const PPP_InputEvent* BrowserInputEvent::GetInterface() {
119 static const PPP_InputEvent input_event_interface = { 119 static const PPP_InputEvent input_event_interface = {
120 HandleInputEvent 120 HandleInputEvent
121 }; 121 };
122 return &input_event_interface; 122 return &input_event_interface;
123 } 123 }
124 124
125 } // namespace ppapi_proxy 125 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698