| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // url. | 64 // url. |
| 65 void setDefaultRequestUrl(const KURL&); | 65 void setDefaultRequestUrl(const 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 willDetachFrameHost() override; | 74 void contextDestroyed() override; |
| 75 | 75 |
| 76 // Return the connection associated with the given |connectionClient| or | 76 // Return the connection associated with the given |connectionClient| or |
| 77 // null if it doesn't exist. | 77 // null if it doesn't exist. |
| 78 PresentationConnection* findConnection(WebPresentationConnectionClient*); | 78 PresentationConnection* findConnection(WebPresentationConnectionClient*); |
| 79 | 79 |
| 80 // The WebPresentationClient which allows communicating with the embedder. | 80 // The WebPresentationClient which allows communicating with the embedder. |
| 81 // It is not owned by the PresentationController but the controller will | 81 // It is not owned by the PresentationController but the controller will |
| 82 // set it to null when the LocalFrame will be detached at which point the | 82 // set it to null when the LocalFrame will be detached at which point the |
| 83 // client can't be used. | 83 // client can't be used. |
| 84 WebPresentationClient* m_client; | 84 WebPresentationClient* m_client; |
| 85 | 85 |
| 86 // Default PresentationRequest used by the embedder. | 86 // Default PresentationRequest used by the embedder. |
| 87 // Member<PresentationRequest> m_defaultRequest; | 87 // Member<PresentationRequest> m_defaultRequest; |
| 88 WeakMember<Presentation> m_presentation; | 88 WeakMember<Presentation> m_presentation; |
| 89 | 89 |
| 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 |