| 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_PEPPER_WEBSOCKET_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_WEBSOCKET_HOST_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_WEBSOCKET_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_WEBSOCKET_HOST_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 : public ppapi::host::ResourceHost, | 29 : public ppapi::host::ResourceHost, |
| 30 public NON_EXPORTED_BASE(::blink::WebSocketClient) { | 30 public NON_EXPORTED_BASE(::blink::WebSocketClient) { |
| 31 public: | 31 public: |
| 32 explicit PepperWebSocketHost(RendererPpapiHost* host, | 32 explicit PepperWebSocketHost(RendererPpapiHost* host, |
| 33 PP_Instance instance, | 33 PP_Instance instance, |
| 34 PP_Resource resource); | 34 PP_Resource resource); |
| 35 virtual ~PepperWebSocketHost(); | 35 virtual ~PepperWebSocketHost(); |
| 36 | 36 |
| 37 virtual int32_t OnResourceMessageReceived( | 37 virtual int32_t OnResourceMessageReceived( |
| 38 const IPC::Message& msg, | 38 const IPC::Message& msg, |
| 39 ppapi::host::HostMessageContext* context) OVERRIDE; | 39 ppapi::host::HostMessageContext* context) override; |
| 40 | 40 |
| 41 // WebSocketClient implementation. | 41 // WebSocketClient implementation. |
| 42 virtual void didConnect(); | 42 virtual void didConnect(); |
| 43 virtual void didReceiveMessage(const blink::WebString& message); | 43 virtual void didReceiveMessage(const blink::WebString& message); |
| 44 virtual void didReceiveArrayBuffer(const blink::WebArrayBuffer& binaryData); | 44 virtual void didReceiveArrayBuffer(const blink::WebArrayBuffer& binaryData); |
| 45 virtual void didReceiveMessageError(); | 45 virtual void didReceiveMessageError(); |
| 46 virtual void didUpdateBufferedAmount(unsigned long buffered_amount); | 46 virtual void didUpdateBufferedAmount(unsigned long buffered_amount); |
| 47 virtual void didStartClosingHandshake(); | 47 virtual void didStartClosingHandshake(); |
| 48 virtual void didClose(unsigned long unhandled_buffered_amount, | 48 virtual void didClose(unsigned long unhandled_buffered_amount, |
| 49 ClosingHandshakeCompletionStatus status, | 49 ClosingHandshakeCompletionStatus status, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Keeps the WebKit side WebSocket object. This is used for calling WebKit | 91 // Keeps the WebKit side WebSocket object. This is used for calling WebKit |
| 92 // side functions via WebKit API. | 92 // side functions via WebKit API. |
| 93 scoped_ptr<blink::WebSocket> websocket_; | 93 scoped_ptr<blink::WebSocket> websocket_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(PepperWebSocketHost); | 95 DISALLOW_COPY_AND_ASSIGN(PepperWebSocketHost); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace content | 98 } // namespace content |
| 99 | 99 |
| 100 #endif // CONTENT_RENDERER_PEPPER_PEPPER_WEBSOCKET_HOST_H_ | 100 #endif // CONTENT_RENDERER_PEPPER_PEPPER_WEBSOCKET_HOST_H_ |
| OLD | NEW |