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 PresentationSessionClientCallbacks_h | 5 #ifndef PresentationSessionClientCallbacks_h |
6 #define PresentationSessionClientCallbacks_h | 6 #define PresentationSessionClientCallbacks_h |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 #include "public/platform/modules/presentation/WebPresentationClient.h" | 9 #include "public/platform/modules/presentation/WebPresentationClient.h" |
10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // corresponding Promise given to the frame. | 21 // corresponding Promise given to the frame. |
22 // When creating the session succeeds, onSuccess() is invoked with the | 22 // When creating the session succeeds, onSuccess() is invoked with the |
23 // implementation of the WebPresentationSessionClient interface. If creating the | 23 // implementation of the WebPresentationSessionClient interface. If creating the |
24 // session fails, onError() is invoked with the implementation of the | 24 // session fails, onError() is invoked with the implementation of the |
25 // WebPresentationError interface. | 25 // WebPresentationError interface. |
26 // Owned by the receiver of the callback and must be deleted after use. | 26 // Owned by the receiver of the callback and must be deleted after use. |
27 class PresentationSessionClientCallbacks final : public WebPresentationSessionCl
ientCallbacks { | 27 class PresentationSessionClientCallbacks final : public WebPresentationSessionCl
ientCallbacks { |
28 WTF_MAKE_NONCOPYABLE(PresentationSessionClientCallbacks); | 28 WTF_MAKE_NONCOPYABLE(PresentationSessionClientCallbacks); |
29 public: | 29 public: |
30 PresentationSessionClientCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResol
ver>, Presentation*); | 30 PresentationSessionClientCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResol
ver>, Presentation*); |
31 virtual ~PresentationSessionClientCallbacks(); | 31 ~PresentationSessionClientCallbacks() override; |
32 | 32 |
33 // WebPresentationSessionClientCallbacks implementation. | 33 // WebPresentationSessionClientCallbacks implementation. |
34 virtual void onSuccess(WebPresentationSessionClient*) override; | 34 void onSuccess(WebPresentationSessionClient*) override; |
35 virtual void onError(WebPresentationError*) override; | 35 void onError(WebPresentationError*) override; |
36 | 36 |
37 private: | 37 private: |
38 RefPtrWillBePersistent<ScriptPromiseResolver> m_resolver; | 38 RefPtrWillBePersistent<ScriptPromiseResolver> m_resolver; |
39 Persistent<Presentation> m_presentation; | 39 Persistent<Presentation> m_presentation; |
40 }; | 40 }; |
41 | 41 |
42 } // namespace blink | 42 } // namespace blink |
43 | 43 |
44 #endif // PresentationSessionClientCallbacks_h | 44 #endif // PresentationSessionClientCallbacks_h |
OLD | NEW |