Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationController.h

Issue 2388693002: Make DOMWindowProperty a thin wrapper of ContextLifecycleObserver
Patch Set: temp Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/DOMWindowProperty.h" 8 #include "core/frame/DOMWindowProperty.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // url. 70 // url.
71 void setDefaultRequestUrl(const KURL&); 71 void setDefaultRequestUrl(const KURL&);
72 72
73 // Handling of running connections. 73 // Handling of running connections.
74 void registerConnection(PresentationConnection*); 74 void registerConnection(PresentationConnection*);
75 75
76 private: 76 private:
77 PresentationController(LocalFrame&, WebPresentationClient*); 77 PresentationController(LocalFrame&, WebPresentationClient*);
78 78
79 // Implementation of DOMWindowProperty. 79 // Implementation of DOMWindowProperty.
80 void frameDestroyed() override; 80 void contextDestroyed() override;
81 81
82 // Return the connection associated with the given |connectionClient| or 82 // Return the connection associated with the given |connectionClient| or
83 // null if it doesn't exist. 83 // null if it doesn't exist.
84 PresentationConnection* findConnection(WebPresentationConnectionClient*); 84 PresentationConnection* findConnection(WebPresentationConnectionClient*);
85 85
86 // The WebPresentationClient which allows communicating with the embedder. 86 // The WebPresentationClient which allows communicating with the embedder.
87 // It is not owned by the PresentationController but the controller will 87 // It is not owned by the PresentationController but the controller will
88 // set it to null when the LocalFrame will be detached at which point the 88 // set it to null when the LocalFrame will be detached at which point the
89 // client can't be used. 89 // client can't be used.
90 WebPresentationClient* m_client; 90 WebPresentationClient* m_client;
91 91
92 // Default PresentationRequest used by the embedder. 92 // Default PresentationRequest used by the embedder.
93 // Member<PresentationRequest> m_defaultRequest; 93 // Member<PresentationRequest> m_defaultRequest;
94 WeakMember<Presentation> m_presentation; 94 WeakMember<Presentation> m_presentation;
95 95
96 // The presentation connections associated with that frame. 96 // The presentation connections associated with that frame.
97 // TODO(mlamouri): the PresentationController will keep any created 97 // TODO(mlamouri): the PresentationController will keep any created
98 // connections alive until the frame is detached. These should be weak ptr 98 // connections alive until the frame is detached. These should be weak ptr
99 // so that the connection can be GC'd. 99 // so that the connection can be GC'd.
100 HeapHashSet<Member<PresentationConnection>> m_connections; 100 HeapHashSet<Member<PresentationConnection>> m_connections;
101 }; 101 };
102 102
103 } // namespace blink 103 } // namespace blink
104 104
105 #endif // PresentationController_h 105 #endif // PresentationController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698