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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, |
50 unsigned short code, | 50 unsigned short code, |
51 const blink::WebString& reason); | 51 const blink::WebString& reason); |
| 52 |
52 private: | 53 private: |
53 // IPC message handlers. | 54 // IPC message handlers. |
54 int32_t OnHostMsgConnect(ppapi::host::HostMessageContext* context, | 55 int32_t OnHostMsgConnect(ppapi::host::HostMessageContext* context, |
55 const std::string& url, | 56 const std::string& url, |
56 const std::vector<std::string>& protocols); | 57 const std::vector<std::string>& protocols); |
57 int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context, | 58 int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context, |
58 int32_t code, | 59 int32_t code, |
59 const std::string& reason); | 60 const std::string& reason); |
60 int32_t OnHostMsgSendText(ppapi::host::HostMessageContext* context, | 61 int32_t OnHostMsgSendText(ppapi::host::HostMessageContext* context, |
61 const std::string& message); | 62 const std::string& message); |
(...skipping 28 matching lines...) Expand all Loading... |
90 // 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 |
91 // side functions via WebKit API. | 92 // side functions via WebKit API. |
92 scoped_ptr<blink::WebSocket> websocket_; | 93 scoped_ptr<blink::WebSocket> websocket_; |
93 | 94 |
94 DISALLOW_COPY_AND_ASSIGN(PepperWebSocketHost); | 95 DISALLOW_COPY_AND_ASSIGN(PepperWebSocketHost); |
95 }; | 96 }; |
96 | 97 |
97 } // namespace content | 98 } // namespace content |
98 | 99 |
99 #endif // CONTENT_RENDERER_PEPPER_PEPPER_WEBSOCKET_HOST_H_ | 100 #endif // CONTENT_RENDERER_PEPPER_PEPPER_WEBSOCKET_HOST_H_ |
OLD | NEW |