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

Side by Side Diff: webkit/plugins/ppapi/message_channel.h

Issue 16140011: Don't send PP_Vars/V8 values with cycles across PostMessage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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) 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 WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_
6 #define WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 }; 46 };
47 47
48 explicit MessageChannel(PluginInstance* instance); 48 explicit MessageChannel(PluginInstance* instance);
49 ~MessageChannel(); 49 ~MessageChannel();
50 50
51 // Post a message to the onmessage handler for this channel's instance 51 // Post a message to the onmessage handler for this channel's instance
52 // asynchronously. 52 // asynchronously.
53 void PostMessageToJavaScript(PP_Var message_data); 53 void PostMessageToJavaScript(PP_Var message_data);
54 // Post a message to the PPP_Instance HandleMessage function for this 54 // Post a message to the PPP_Instance HandleMessage function for this
55 // channel's instance. 55 // channel's instance.
56 void PostMessageToNative(PP_Var message_data); 56 void PostMessageToNative(PP_Var message_data,
57 bool success,
58 const std::string& error);
57 59
58 // Return the NPObject* to which we should forward any calls which aren't 60 // Return the NPObject* to which we should forward any calls which aren't
59 // related to postMessage. Note that this can be NULL; it only gets set if 61 // related to postMessage. Note that this can be NULL; it only gets set if
60 // there is a scriptable 'InstanceObject' associated with this channel's 62 // there is a scriptable 'InstanceObject' associated with this channel's
61 // instance. 63 // instance.
62 NPObject* passthrough_object() { 64 NPObject* passthrough_object() {
63 return passthrough_object_; 65 return passthrough_object_;
64 } 66 }
65 void SetPassthroughObject(NPObject* passthrough); 67 void SetPassthroughObject(NPObject* passthrough);
66 68
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 }; 116 };
115 EarlyMessageQueueState early_message_queue_state_; 117 EarlyMessageQueueState early_message_queue_state_;
116 118
117 DISALLOW_COPY_AND_ASSIGN(MessageChannel); 119 DISALLOW_COPY_AND_ASSIGN(MessageChannel);
118 }; 120 };
119 121
120 } // namespace ppapi 122 } // namespace ppapi
121 } // namespace webkit 123 } // namespace webkit
122 124
123 #endif // WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_ 125 #endif // WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698