OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 WebPepperSocketChannelClientProxy_h | 5 #ifndef WebPepperSocketChannelClientProxy_h |
6 #define WebPepperSocketChannelClientProxy_h | 6 #define WebPepperSocketChannelClientProxy_h |
7 | 7 |
| 8 #include <stdint.h> |
| 9 #include <memory> |
8 #include "modules/websockets/WebSocketChannelClient.h" | 10 #include "modules/websockets/WebSocketChannelClient.h" |
9 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
10 #include "web/WebPepperSocketImpl.h" | 12 #include "web/WebPepperSocketImpl.h" |
11 #include "wtf/Vector.h" | 13 #include "wtf/Vector.h" |
12 #include "wtf/text/WTFString.h" | 14 #include "wtf/text/WTFString.h" |
13 #include <memory> | |
14 #include <stdint.h> | |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 | 17 |
18 // Ideally we want to simply make WebPepperSocketImpl inherit from | 18 // Ideally we want to simply make WebPepperSocketImpl inherit from |
19 // WebPepperSocketChannelClient, but we cannot do that because | 19 // WebPepperSocketChannelClient, but we cannot do that because |
20 // WebSocketChannelClient needs to be on Oilpan's heap whereas | 20 // WebSocketChannelClient needs to be on Oilpan's heap whereas |
21 // WebPepperSocketImpl cannot be on Oilpan's heap. Thus we need to introduce a | 21 // WebPepperSocketImpl cannot be on Oilpan's heap. Thus we need to introduce a |
22 // proxy class to decouple WebPepperSocketImpl from WebSocketChannelClient. | 22 // proxy class to decouple WebPepperSocketImpl from WebSocketChannelClient. |
23 class WebPepperSocketChannelClientProxy final | 23 class WebPepperSocketChannelClientProxy final |
24 : public GarbageCollectedFinalized<WebPepperSocketChannelClientProxy>, | 24 : public GarbageCollectedFinalized<WebPepperSocketChannelClientProxy>, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 private: | 59 private: |
60 explicit WebPepperSocketChannelClientProxy(WebPepperSocketImpl* impl) | 60 explicit WebPepperSocketChannelClientProxy(WebPepperSocketImpl* impl) |
61 : m_impl(impl) {} | 61 : m_impl(impl) {} |
62 | 62 |
63 WebPepperSocketImpl* m_impl; | 63 WebPepperSocketImpl* m_impl; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
67 | 67 |
68 #endif // WebPepperSocketChannelClientProxy_h | 68 #endif // WebPepperSocketChannelClientProxy_h |
OLD | NEW |