OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 WebPresentationConnectionClient_h | 5 #ifndef WebPresentationConnectionClient_h |
6 #define WebPresentationConnectionClient_h | 6 #define WebPresentationConnectionClient_h |
7 | 7 |
8 #include "public/platform/WebString.h" | 8 #include "public/platform/WebString.h" |
9 #include "public/platform/WebURL.h" | 9 #include "public/platform/WebURL.h" |
10 | 10 |
| 11 #include <memory> |
| 12 |
11 namespace blink { | 13 namespace blink { |
12 | 14 |
| 15 class WebPresentationConnectionProxy; |
| 16 |
13 enum class WebPresentationConnectionState { | 17 enum class WebPresentationConnectionState { |
14 Connecting = 0, | 18 Connecting = 0, |
15 Connected, | 19 Connected, |
16 Closed, | 20 Closed, |
17 Terminated, | 21 Terminated, |
18 }; | 22 }; |
19 | 23 |
20 enum class WebPresentationConnectionCloseReason { Error = 0, Closed, WentAway }; | 24 enum class WebPresentationConnectionCloseReason { Error = 0, Closed, WentAway }; |
21 | 25 |
22 // The implementation the embedder has to provide for the Presentation API to | 26 // The implementation the embedder has to provide for the Presentation API to |
23 // work. | 27 // work. |
24 class WebPresentationConnectionClient { | 28 class WebPresentationConnectionClient { |
25 public: | 29 public: |
26 virtual ~WebPresentationConnectionClient() {} | 30 virtual ~WebPresentationConnectionClient() {} |
27 | 31 |
28 virtual WebString getId() = 0; | 32 virtual WebString getId() = 0; |
29 virtual WebURL getUrl() = 0; | 33 virtual WebURL getUrl() = 0; |
| 34 virtual std::unique_ptr<WebPresentationConnectionProxy> takeProxy() = 0; |
30 }; | 35 }; |
31 | 36 |
32 } // namespace blink | 37 } // namespace blink |
33 | 38 |
34 #endif // WebPresentationConnectionClient_h | 39 #endif // WebPresentationConnectionClient_h |
OLD | NEW |