Chromium Code Reviews| 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 |
|
mark a. foltz
2016/11/16 01:16:39
#include <unique_ptr>
zhaobin
2016/11/23 22:52:29
Done.
| |
| 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 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class WebPresentationConnectionProxy; | |
| 14 | |
| 13 enum class WebPresentationConnectionState { | 15 enum class WebPresentationConnectionState { |
| 14 Connecting = 0, | 16 Connecting = 0, |
| 15 Connected, | 17 Connected, |
| 16 Closed, | 18 Closed, |
| 17 Terminated, | 19 Terminated, |
| 18 }; | 20 }; |
| 19 | 21 |
| 20 enum class WebPresentationConnectionCloseReason { Error = 0, Closed, WentAway }; | 22 enum class WebPresentationConnectionCloseReason { Error = 0, Closed, WentAway }; |
| 21 | 23 |
| 22 // The implementation the embedder has to provide for the Presentation API to | 24 // The implementation the embedder has to provide for the Presentation API to |
| 23 // work. | 25 // work. |
| 24 class WebPresentationConnectionClient { | 26 class WebPresentationConnectionClient { |
| 25 public: | 27 public: |
| 26 virtual ~WebPresentationConnectionClient() {} | 28 virtual ~WebPresentationConnectionClient() {} |
| 27 | 29 |
| 28 virtual WebString getId() = 0; | 30 virtual WebString getId() = 0; |
| 29 virtual WebURL getUrl() = 0; | 31 virtual WebURL getUrl() = 0; |
| 32 virtual std::unique_ptr<WebPresentationConnectionProxy> takeProxy() = 0; | |
| 30 }; | 33 }; |
| 31 | 34 |
| 32 } // namespace blink | 35 } // namespace blink |
| 33 | 36 |
| 34 #endif // WebPresentationConnectionClient_h | 37 #endif // WebPresentationConnectionClient_h |
| OLD | NEW |