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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <queue> | 11 #include <queue> |
11 | 12 |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "ppapi/host/host_message_context.h" | 16 #include "ppapi/host/host_message_context.h" |
17 #include "ppapi/host/resource_host.h" | 17 #include "ppapi/host/resource_host.h" |
18 #include "ppapi/proxy/resource_message_params.h" | 18 #include "ppapi/proxy/resource_message_params.h" |
19 #include "third_party/WebKit/public/web/WebPepperSocket.h" | 19 #include "third_party/WebKit/public/web/WebPepperSocket.h" |
20 #include "third_party/WebKit/public/web/WebPepperSocketClient.h" | 20 #include "third_party/WebKit/public/web/WebPepperSocketClient.h" |
21 | 21 |
22 namespace ppapi { | 22 namespace ppapi { |
23 class StringVar; | 23 class StringVar; |
24 class Var; | 24 class Var; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // A flag to indicate if server initiated closing handshake is performed. | 87 // A flag to indicate if server initiated closing handshake is performed. |
88 bool accepting_close_; | 88 bool accepting_close_; |
89 | 89 |
90 // Becomes true if any error is detected. Incoming data will be disposed | 90 // Becomes true if any error is detected. Incoming data will be disposed |
91 // if this variable is true. | 91 // if this variable is true. |
92 bool error_was_received_; | 92 bool error_was_received_; |
93 | 93 |
94 // Keeps the WebKit side WebSocket object. This is used for calling WebKit | 94 // Keeps the WebKit side WebSocket object. This is used for calling WebKit |
95 // side functions via WebKit API. | 95 // side functions via WebKit API. |
96 scoped_ptr<blink::WebPepperSocket> websocket_; | 96 std::unique_ptr<blink::WebPepperSocket> websocket_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(PepperWebSocketHost); | 98 DISALLOW_COPY_AND_ASSIGN(PepperWebSocketHost); |
99 }; | 99 }; |
100 | 100 |
101 } // namespace content | 101 } // namespace content |
102 | 102 |
103 #endif // CONTENT_RENDERER_PEPPER_PEPPER_WEBSOCKET_HOST_H_ | 103 #endif // CONTENT_RENDERER_PEPPER_PEPPER_WEBSOCKET_HOST_H_ |
OLD | NEW |