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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void didReceiveSessionTextMessage(WebPresentationConnectionClient*, const We
bString&) override; | 54 void didReceiveSessionTextMessage(WebPresentationConnectionClient*, const We
bString&) override; |
55 void didReceiveSessionBinaryMessage(WebPresentationConnectionClient*, const
uint8_t* data, size_t length) override; | 55 void didReceiveSessionBinaryMessage(WebPresentationConnectionClient*, const
uint8_t* data, size_t length) override; |
56 | 56 |
57 // Called by the Presentation object to advertize itself to the controller. | 57 // Called by the Presentation object to advertize itself to the controller. |
58 // The Presentation object is kept as a WeakMember in order to avoid keeping | 58 // The Presentation object is kept as a WeakMember in order to avoid keeping |
59 // it alive when it is no longer in the tree. | 59 // it alive when it is no longer in the tree. |
60 void setPresentation(Presentation*); | 60 void setPresentation(Presentation*); |
61 | 61 |
62 // Called by the Presentation object when the default request is updated | 62 // Called by the Presentation object when the default request is updated |
63 // in order to notify the client about the change of default presentation | 63 // in order to notify the client about the change of default presentation |
64 // url. | 64 // urls. |
65 void setDefaultRequestUrl(const KURL&); | 65 void setDefaultRequestUrls(const WTF::Vector<KURL>&); |
66 | 66 |
67 // Handling of running connections. | 67 // Handling of running connections. |
68 void registerConnection(PresentationConnection*); | 68 void registerConnection(PresentationConnection*); |
69 | 69 |
70 private: | 70 private: |
71 PresentationController(LocalFrame&, WebPresentationClient*); | 71 PresentationController(LocalFrame&, WebPresentationClient*); |
72 | 72 |
73 // Implementation of LocalFrameLifecycleObserver. | 73 // Implementation of LocalFrameLifecycleObserver. |
74 void contextDestroyed() override; | 74 void contextDestroyed() override; |
75 | 75 |
(...skipping 14 matching lines...) Expand all Loading... |
90 // The presentation connections associated with that frame. | 90 // The presentation connections associated with that frame. |
91 // TODO(mlamouri): the PresentationController will keep any created | 91 // TODO(mlamouri): the PresentationController will keep any created |
92 // connections alive until the frame is detached. These should be weak ptr | 92 // connections alive until the frame is detached. These should be weak ptr |
93 // so that the connection can be GC'd. | 93 // so that the connection can be GC'd. |
94 HeapHashSet<Member<PresentationConnection>> m_connections; | 94 HeapHashSet<Member<PresentationConnection>> m_connections; |
95 }; | 95 }; |
96 | 96 |
97 } // namespace blink | 97 } // namespace blink |
98 | 98 |
99 #endif // PresentationController_h | 99 #endif // PresentationController_h |
OLD | NEW |