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

Side by Side Diff: content/renderer/pepper/message_channel.h

Issue 264303002: PPAPI: Implement synchronous postMessage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 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
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | content/renderer/pepper/message_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_
6 #define CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ 6 #define CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 explicit MessageChannel(PepperPluginInstanceImpl* instance); 53 explicit MessageChannel(PepperPluginInstanceImpl* instance);
54 ~MessageChannel(); 54 ~MessageChannel();
55 55
56 // Post a message to the onmessage handler for this channel's instance 56 // Post a message to the onmessage handler for this channel's instance
57 // asynchronously. 57 // asynchronously.
58 void PostMessageToJavaScript(PP_Var message_data); 58 void PostMessageToJavaScript(PP_Var message_data);
59 59
60 // Post a message to the plugin's HandleMessage function for this channel's 60 // Post a message to the plugin's HandleMessage function for this channel's
61 // instance. 61 // instance.
62 void PostMessageToNative(const NPVariant* message_data); 62 void PostMessageToNative(const NPVariant* message_data);
63 // Post a message to the plugin's HandleBlocking Message function for this
64 // channel's instance synchronously, and return a result.
65 void PostBlockingMessageToNative(const NPVariant* message_data,
66 NPVariant* np_result);
63 67
64 // Return the NPObject* to which we should forward any calls which aren't 68 // Return the NPObject* to which we should forward any calls which aren't
65 // related to postMessage. Note that this can be NULL; it only gets set if 69 // related to postMessage. Note that this can be NULL; it only gets set if
66 // there is a scriptable 'InstanceObject' associated with this channel's 70 // there is a scriptable 'InstanceObject' associated with this channel's
67 // instance. 71 // instance.
68 NPObject* passthrough_object() { return passthrough_object_; } 72 NPObject* passthrough_object() { return passthrough_object_; }
69 void SetPassthroughObject(NPObject* passthrough); 73 void SetPassthroughObject(NPObject* passthrough);
70 74
71 NPObject* np_object() { return np_object_; } 75 NPObject* np_object() { return np_object_; }
72 76
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // This is used to ensure pending tasks will not fire after this object is 139 // This is used to ensure pending tasks will not fire after this object is
136 // destroyed. 140 // destroyed.
137 base::WeakPtrFactory<MessageChannel> weak_ptr_factory_; 141 base::WeakPtrFactory<MessageChannel> weak_ptr_factory_;
138 142
139 DISALLOW_COPY_AND_ASSIGN(MessageChannel); 143 DISALLOW_COPY_AND_ASSIGN(MessageChannel);
140 }; 144 };
141 145
142 } // namespace content 146 } // namespace content
143 147
144 #endif // CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ 148 #endif // CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_
OLDNEW
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | content/renderer/pepper/message_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698