| Index: third_party/WebKit/public/platform/WebMessagePortChannel.h
|
| diff --git a/third_party/WebKit/public/platform/WebMessagePortChannel.h b/third_party/WebKit/public/platform/WebMessagePortChannel.h
|
| index 0739fbf0a02b8d2b8a74d9b443aa03891c6e0795..bdab5fc6c812ec68c19b6112933d8ce45333593c 100644
|
| --- a/third_party/WebKit/public/platform/WebMessagePortChannel.h
|
| +++ b/third_party/WebKit/public/platform/WebMessagePortChannel.h
|
| @@ -33,48 +33,28 @@
|
|
|
| #include "WebCommon.h"
|
| #include "WebVector.h"
|
| -
|
| -#if INSIDE_BLINK
|
| #include <memory>
|
| -#endif
|
|
|
| namespace blink {
|
|
|
| class WebMessagePortChannelClient;
|
| class WebString;
|
|
|
| -typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray;
|
| +using WebMessagePortChannelUniquePtr =
|
| + std::unique_ptr<class WebMessagePortChannel>;
|
| +using WebMessagePortChannelArray = WebVector<WebMessagePortChannelUniquePtr>;
|
|
|
| -// Provides an interface to a Message Port Channel implementation. The object
|
| -// owns itself and is signalled that its not needed anymore with the destroy()
|
| -// call.
|
| +// Provides an interface to a Message Port Channel implementation.
|
| class WebMessagePortChannel {
|
| public:
|
| + virtual ~WebMessagePortChannel() {}
|
| virtual void setClient(WebMessagePortChannelClient*) = 0;
|
| - virtual void destroy() = 0;
|
| // Callee receives ownership of the passed vector.
|
| // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/351753
|
| virtual void postMessage(const WebString&, WebMessagePortChannelArray*) = 0;
|
| virtual bool tryGetMessage(WebString*, WebMessagePortChannelArray&) = 0;
|
| -
|
| - protected:
|
| - ~WebMessagePortChannel() {}
|
| };
|
|
|
| -#if INSIDE_BLINK
|
| -
|
| -struct WebMessagePortChannelDeleter {
|
| - void operator()(WebMessagePortChannel* channel) {
|
| - if (channel)
|
| - channel->destroy();
|
| - }
|
| -};
|
| -
|
| -using WebMessagePortChannelUniquePtr =
|
| - std::unique_ptr<WebMessagePortChannel, WebMessagePortChannelDeleter>;
|
| -
|
| -#endif // INSIDE_BLINK
|
| -
|
| } // namespace blink
|
|
|
| #endif // WebMessagePortChannel_h
|
|
|