| OLD | NEW |
| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 void BeginBlockOnSyncMessage() override; | 110 void BeginBlockOnSyncMessage() override; |
| 111 void EndBlockOnSyncMessage() override; | 111 void EndBlockOnSyncMessage() override; |
| 112 | 112 |
| 113 // Post a message to the plugin's HandleMessage function for this channel's | 113 // Post a message to the plugin's HandleMessage function for this channel's |
| 114 // instance. | 114 // instance. |
| 115 void PostMessageToNative(gin::Arguments* args); | 115 void PostMessageToNative(gin::Arguments* args); |
| 116 // Post a message to the plugin's HandleBlocking Message function for this | 116 // Post a message to the plugin's HandleBlocking Message function for this |
| 117 // channel's instance synchronously, and return a result. | 117 // channel's instance synchronously, and return a result. |
| 118 void PostBlockingMessageToNative(gin::Arguments* args); | 118 void PostBlockingMessageToNative(gin::Arguments* args); |
| 119 | 119 |
| 120 // Checks if the plugin is marked peripheral. (Only works for test plugins.) |
| 121 void IsPeripheralToNative(gin::Arguments* args); |
| 122 |
| 120 // Post a message to the onmessage handler for this channel's instance | 123 // Post a message to the onmessage handler for this channel's instance |
| 121 // synchronously. This is used by PostMessageToJavaScript. | 124 // synchronously. This is used by PostMessageToJavaScript. |
| 122 void PostMessageToJavaScriptImpl( | 125 void PostMessageToJavaScriptImpl( |
| 123 const blink::WebSerializedScriptValue& message_data); | 126 const blink::WebSerializedScriptValue& message_data); |
| 124 | 127 |
| 125 PluginObject* GetPluginObject(v8::Isolate* isolate); | 128 PluginObject* GetPluginObject(v8::Isolate* isolate); |
| 126 | 129 |
| 127 void EnqueuePluginMessage(v8::Handle<v8::Value> v8_value); | 130 void EnqueuePluginMessage(v8::Handle<v8::Value> v8_value); |
| 128 | 131 |
| 129 void FromV8ValueComplete(VarConversionResult* result_holder, | 132 void FromV8ValueComplete(VarConversionResult* result_holder, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // This is used to ensure pending tasks will not fire after this object is | 200 // This is used to ensure pending tasks will not fire after this object is |
| 198 // destroyed. | 201 // destroyed. |
| 199 base::WeakPtrFactory<MessageChannel> weak_ptr_factory_; | 202 base::WeakPtrFactory<MessageChannel> weak_ptr_factory_; |
| 200 | 203 |
| 201 DISALLOW_COPY_AND_ASSIGN(MessageChannel); | 204 DISALLOW_COPY_AND_ASSIGN(MessageChannel); |
| 202 }; | 205 }; |
| 203 | 206 |
| 204 } // namespace content | 207 } // namespace content |
| 205 | 208 |
| 206 #endif // CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ | 209 #endif // CONTENT_RENDERER_PEPPER_MESSAGE_CHANNEL_H_ |
| OLD | NEW |