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 PresentationController_h | 5 #ifndef PresentationController_h |
6 #define PresentationController_h | 6 #define PresentationController_h |
7 | 7 |
8 #include "core/frame/LocalFrameLifecycleObserver.h" | 8 #include "core/frame/LocalFrameLifecycleObserver.h" |
9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
10 #include "modules/presentation/Presentation.h" | 10 #include "modules/presentation/Presentation.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 // The coordinator between the various page exposed properties and the content | 23 // The coordinator between the various page exposed properties and the content |
24 // layer represented via |WebPresentationClient|. | 24 // layer represented via |WebPresentationClient|. |
25 class MODULES_EXPORT PresentationController final | 25 class MODULES_EXPORT PresentationController final |
26 : public NoBaseWillBeGarbageCollectedFinalized<PresentationController> | 26 : public NoBaseWillBeGarbageCollectedFinalized<PresentationController> |
27 , public WillBeHeapSupplement<LocalFrame> | 27 , public WillBeHeapSupplement<LocalFrame> |
28 , public LocalFrameLifecycleObserver | 28 , public LocalFrameLifecycleObserver |
29 , public WebPresentationController { | 29 , public WebPresentationController { |
30 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationController); | 30 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationController); |
31 WTF_MAKE_NONCOPYABLE(PresentationController); | 31 WTF_MAKE_NONCOPYABLE(PresentationController); |
32 public: | 32 public: |
33 virtual ~PresentationController(); | 33 ~PresentationController() override; |
34 | 34 |
35 static PassOwnPtrWillBeRawPtr<PresentationController> create(LocalFrame&, We
bPresentationClient*); | 35 static PassOwnPtrWillBeRawPtr<PresentationController> create(LocalFrame&, We
bPresentationClient*); |
36 | 36 |
37 static const char* supplementName(); | 37 static const char* supplementName(); |
38 static PresentationController* from(LocalFrame&); | 38 static PresentationController* from(LocalFrame&); |
39 | 39 |
40 static void provideTo(LocalFrame&, WebPresentationClient*); | 40 static void provideTo(LocalFrame&, WebPresentationClient*); |
41 | 41 |
42 WebPresentationClient* client(); | 42 WebPresentationClient* client(); |
43 | 43 |
44 // Implementation of HeapSupplement. | 44 // Implementation of HeapSupplement. |
45 DECLARE_VIRTUAL_TRACE(); | 45 DECLARE_VIRTUAL_TRACE(); |
46 | 46 |
47 // Implementation of WebPresentationController. | 47 // Implementation of WebPresentationController. |
48 virtual void didStartDefaultSession(WebPresentationSessionClient*) override; | 48 void didStartDefaultSession(WebPresentationSessionClient*) override; |
49 virtual void didChangeSessionState(WebPresentationSessionClient*, WebPresent
ationSessionState) override; | 49 void didChangeSessionState(WebPresentationSessionClient*, WebPresentationSes
sionState) override; |
50 virtual void didReceiveSessionTextMessage(WebPresentationSessionClient*, con
st WebString&) override; | 50 void didReceiveSessionTextMessage(WebPresentationSessionClient*, const WebSt
ring&) override; |
51 virtual void didReceiveSessionBinaryMessage(WebPresentationSessionClient*, c
onst uint8_t* data, size_t length) override; | 51 void didReceiveSessionBinaryMessage(WebPresentationSessionClient*, const uin
t8_t* data, size_t length) override; |
52 | 52 |
53 // Connects the |Presentation| object with this controller. | 53 // Connects the |Presentation| object with this controller. |
54 void setPresentation(Presentation*); | 54 void setPresentation(Presentation*); |
55 | 55 |
56 private: | 56 private: |
57 PresentationController(LocalFrame&, WebPresentationClient*); | 57 PresentationController(LocalFrame&, WebPresentationClient*); |
58 | 58 |
59 // Implementation of LocalFrameLifecycleObserver. | 59 // Implementation of LocalFrameLifecycleObserver. |
60 virtual void willDetachFrameHost() override; | 60 void willDetachFrameHost() override; |
61 | 61 |
62 WebPresentationClient* m_client; | 62 WebPresentationClient* m_client; |
63 PersistentWillBeMember<Presentation> m_presentation; | 63 PersistentWillBeMember<Presentation> m_presentation; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
67 | 67 |
68 #endif // PresentationController_h | 68 #endif // PresentationController_h |
OLD | NEW |