| Index: third_party/WebKit/public/platform/modules/websockets/WebSocketHandshakeResponseInfo.h
|
| diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h b/third_party/WebKit/public/platform/modules/websockets/WebSocketHandshakeResponseInfo.h
|
| similarity index 65%
|
| copy from third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
|
| copy to third_party/WebKit/public/platform/modules/websockets/WebSocketHandshakeResponseInfo.h
|
| index ac5e003d0ac850ad9783e41d975bc786dc959744..ec8847f74d043e00e36b9d6499b1a602982c19bf 100644
|
| --- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
|
| +++ b/third_party/WebKit/public/platform/modules/websockets/WebSocketHandshakeResponseInfo.h
|
| @@ -28,31 +28,36 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef WebServiceWorkerProviderClient_h
|
| -#define WebServiceWorkerProviderClient_h
|
| +#ifndef WebSocketHandshakeResponseInfo_h
|
| +#define WebSocketHandshakeResponseInfo_h
|
|
|
| #include "public/platform/WebCommon.h"
|
| -#include "public/platform/WebMessagePortChannel.h"
|
| -#include "public/platform/modules/serviceworker/WebServiceWorker.h"
|
| -
|
| +#include "public/platform/WebNonCopyable.h"
|
| #include <memory>
|
|
|
| namespace blink {
|
|
|
| -class WebServiceWorker;
|
| class WebString;
|
| +class WebSocketHandshakeResponse;
|
|
|
| -// This class is the interface for embedders to talk to
|
| -// ServiceWorkerContainer.
|
| -class BLINK_PLATFORM_EXPORT WebServiceWorkerProviderClient {
|
| +class WebSocketHandshakeResponseInfo : public WebNonCopyable {
|
| public:
|
| - virtual ~WebServiceWorkerProviderClient() { }
|
| + BLINK_PLATFORM_EXPORT WebSocketHandshakeResponseInfo();
|
| + BLINK_PLATFORM_EXPORT ~WebSocketHandshakeResponseInfo();
|
| +
|
| + BLINK_PLATFORM_EXPORT void setStatusCode(int);
|
| + BLINK_PLATFORM_EXPORT void setStatusText(const WebString&);
|
| + BLINK_PLATFORM_EXPORT void addHeaderField(const WebString& name, const WebString& value);
|
| + BLINK_PLATFORM_EXPORT void setHeadersText(const WebString&);
|
|
|
| - virtual void setController(std::unique_ptr<WebServiceWorker::Handle>, bool shouldNotifyControllerChange) = 0;
|
| +#if INSIDE_BLINK
|
| + BLINK_PLATFORM_EXPORT const WebSocketHandshakeResponse& toCoreResponse() const { return *m_private.get(); }
|
| +#endif // INSIDE_BLINK
|
|
|
| - virtual void dispatchMessageEvent(std::unique_ptr<WebServiceWorker::Handle>, const WebString& message, const WebMessagePortChannelArray& channels) = 0;
|
| +private:
|
| + std::unique_ptr<WebSocketHandshakeResponse> m_private;
|
| };
|
|
|
| } // namespace blink
|
|
|
| -#endif // WebServiceWorkerProviderClient_h
|
| +#endif // WebSocketHandshakeResponseInfo_h
|
|
|