OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 WebPresentationConnectionCallbacks_h | 5 #ifndef WebPresentationConnectionCallbacks_h |
6 #define WebPresentationConnectionCallbacks_h | 6 #define WebPresentationConnectionCallbacks_h |
7 | 7 |
8 #include "public/platform/WebCallbacks.h" | 8 #include "public/platform/WebCallbacks.h" |
9 #include "public/platform/WebCommon.h" | 9 #include "public/platform/WebCommon.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class WebPresentationConnection; | 13 class WebPresentationConnection; |
14 struct WebPresentationError; | 14 struct WebPresentationError; |
15 struct WebPresentationSessionInfo; | 15 struct WebPresentationInfo; |
16 | 16 |
17 // If session was created, callback's onSuccess() is invoked with the | 17 // If a presentation was created, callback's onSuccess() is invoked with the |
18 // information about the presentation session created by the embedder. | 18 // information about the presentation. Otherwise, onError() is invoked with the |
19 // Otherwise, onError() is invoked with the error code and message. | 19 // error code and message. |
20 class WebPresentationConnectionCallbacks | 20 class WebPresentationConnectionCallbacks |
21 : public WebCallbacks<const WebPresentationSessionInfo&, | 21 : public WebCallbacks<const WebPresentationInfo&, |
22 const WebPresentationError&> { | 22 const WebPresentationError&> { |
23 public: | 23 public: |
24 // Returns newly created PresentationConnection object if | 24 // Returns newly created PresentationConnection object if |
25 // WebCallbacks::onSuccess() has been called. | 25 // WebCallbacks::onSuccess() has been called. |
26 virtual WebPresentationConnection* getConnection() = 0; | 26 virtual WebPresentationConnection* getConnection() = 0; |
27 }; | 27 }; |
28 | 28 |
29 } // namespace blink | 29 } // namespace blink |
30 | 30 |
31 #endif // WebPresentationConnectionCallbacks_h | 31 #endif // WebPresentationConnectionCallbacks_h |
OLD | NEW |