| Index: content/child/webmessageportchannel_impl.h
|
| diff --git a/content/child/webmessageportchannel_impl.h b/content/child/webmessageportchannel_impl.h
|
| index f3e6714431ef9f45ee9c5ebaa1accb681d84a57f..cb87aff67a35d7a233492a3d6e3b8c2ee8c7e02d 100644
|
| --- a/content/child/webmessageportchannel_impl.h
|
| +++ b/content/child/webmessageportchannel_impl.h
|
| @@ -10,13 +10,16 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "base/strings/string16.h"
|
| #include "base/synchronization/lock.h"
|
| +#include "content/public/common/message_port_types.h"
|
| #include "ipc/ipc_listener.h"
|
| #include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
|
|
|
| namespace base {
|
| class SingleThreadTaskRunner;
|
| +class Value;
|
| }
|
|
|
| namespace content {
|
| @@ -68,13 +71,13 @@ class WebMessagePortChannelImpl
|
| void Init();
|
| void Entangle(scoped_refptr<WebMessagePortChannelImpl> channel);
|
| void Send(IPC::Message* message);
|
| - void PostMessage(const base::string16& message,
|
| + void PostMessage(const MessagePortMessage& message,
|
| blink::WebMessagePortChannelArray* channels);
|
|
|
| // IPC::Listener implementation.
|
| bool OnMessageReceived(const IPC::Message& message) override;
|
|
|
| - void OnMessage(const base::string16& message,
|
| + void OnMessage(const MessagePortMessage& message,
|
| const std::vector<int>& sent_message_port_ids,
|
| const std::vector<int>& new_routing_ids);
|
| void OnMessagesQueued();
|
| @@ -83,7 +86,7 @@ class WebMessagePortChannelImpl
|
| Message();
|
| ~Message();
|
|
|
| - base::string16 message;
|
| + MessagePortMessage message;
|
| std::vector<WebMessagePortChannelImpl*> ports;
|
| };
|
|
|
| @@ -95,6 +98,10 @@ class WebMessagePortChannelImpl
|
|
|
| int route_id_; // The routing id for this object.
|
| int message_port_id_; // A globally unique identifier for this message port.
|
| + // Flag to indicate if messages should be sent to the browser process as
|
| + // base::Value instances as opposed to being serialized using the default
|
| + // blink::WebSerializedScriptValue.
|
| + bool send_messages_as_values_;
|
| scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl);
|
|
|