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

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

Issue 2602523002: [Presentation API] Resolve PresentationRequest::reconnect() with existing presentation connection i… (Closed)
Patch Set: 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/dom/ContextLifecycleObserver.h" 8 #include "core/dom/ContextLifecycleObserver.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void setPresentation(Presentation*); 66 void setPresentation(Presentation*);
67 67
68 // Called by the Presentation object when the default request is updated 68 // Called by the Presentation object when the default request is updated
69 // in order to notify the client about the change of default presentation 69 // in order to notify the client about the change of default presentation
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 // Return a connection in |m_connections| with id equals to |presentationId|,
77 // url equals to one of |presentationUrls|, and state is not terminated.
78 // Return null if such a connection does not exist.
79 PresentationConnection* findExistingConnection(
80 const blink::WebVector<blink::WebURL>& presentationUrls,
81 const blink::WebString& presentationId);
82
76 private: 83 private:
77 PresentationController(LocalFrame&, WebPresentationClient*); 84 PresentationController(LocalFrame&, WebPresentationClient*);
78 85
79 // Implementation of ContextLifecycleObserver. 86 // Implementation of ContextLifecycleObserver.
80 void contextDestroyed() override; 87 void contextDestroyed() override;
81 88
82 // Return the connection associated with the given |connectionClient| or 89 // Return the connection associated with the given |connectionClient| or
83 // null if it doesn't exist. 90 // null if it doesn't exist.
84 PresentationConnection* findConnection(WebPresentationConnectionClient*); 91 PresentationConnection* findConnection(WebPresentationConnectionClient*);
85 92
(...skipping 10 matching lines...) Expand all
96 // The presentation connections associated with that frame. 103 // The presentation connections associated with that frame.
97 // TODO(mlamouri): the PresentationController will keep any created 104 // TODO(mlamouri): the PresentationController will keep any created
98 // connections alive until the frame is detached. These should be weak ptr 105 // connections alive until the frame is detached. These should be weak ptr
99 // so that the connection can be GC'd. 106 // so that the connection can be GC'd.
100 HeapHashSet<Member<PresentationConnection>> m_connections; 107 HeapHashSet<Member<PresentationConnection>> m_connections;
101 }; 108 };
102 109
103 } // namespace blink 110 } // namespace blink
104 111
105 #endif // PresentationController_h 112 #endif // PresentationController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698