OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 Presentation_h | 5 #ifndef Presentation_h |
6 #define Presentation_h | 6 #define Presentation_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "core/events/EventTarget.h" | 9 #include "core/events/EventTarget.h" |
10 #include "core/frame/DOMWindowProperty.h" | 10 #include "core/frame/DOMWindowProperty.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 bool isAvailableChangeWatched() const; | 62 bool isAvailableChangeWatched() const; |
63 | 63 |
64 // Called when the |defaultsessionstart| event needs to be fired. | 64 // Called when the |defaultsessionstart| event needs to be fired. |
65 void didStartDefaultSession(PresentationSession*); | 65 void didStartDefaultSession(PresentationSession*); |
66 | 66 |
67 // Called when the |onstatechange| event needs to be fired to the right sess
ion. | 67 // Called when the |onstatechange| event needs to be fired to the right sess
ion. |
68 void didChangeSessionState(WebPresentationSessionClient*, WebPresentationSes
sionState); | 68 void didChangeSessionState(WebPresentationSessionClient*, WebPresentationSes
sionState); |
69 | 69 |
70 // Called when the |onmessage| event needs to be fired to the right session. | 70 // Called when the |onmessage| event needs to be fired to the right session. |
71 void didReceiveSessionTextMessage(WebPresentationSessionClient*, const Strin
g& message); | 71 void didReceiveSessionTextMessage(WebPresentationSessionClient*, const Strin
g& message); |
| 72 void didReceiveSessionArrayBufferMessage(WebPresentationSessionClient*, cons
t uint8_t* data, size_t length); |
| 73 void didReceiveSessionBlobMessage(WebPresentationSessionClient*, const uint8
_t* data, size_t length); |
72 | 74 |
73 // Adds a session to the open sessions list. | 75 // Adds a session to the open sessions list. |
74 void registerSession(PresentationSession*); | 76 void registerSession(PresentationSession*); |
75 | 77 |
76 private: | 78 private: |
77 explicit Presentation(LocalFrame*); | 79 explicit Presentation(LocalFrame*); |
78 | 80 |
79 // Returns the |PresentationController| object associated with the frame |Pr
esentation| corresponds to. | 81 // Returns the |PresentationController| object associated with the frame |Pr
esentation| corresponds to. |
80 // Can return |nullptr| if the frame is detached from the document. | 82 // Can return |nullptr| if the frame is detached from the document. |
81 PresentationController* presentationController(); | 83 PresentationController* presentationController(); |
82 | 84 |
83 // Returns the session that matches the WebPresentationSessionClient or null
. | 85 // Returns the session that matches the WebPresentationSessionClient or null
. |
84 PresentationSession* findSession(WebPresentationSessionClient*); | 86 PresentationSession* findSession(WebPresentationSessionClient*); |
85 | 87 |
86 // The session object provided to the presentation page. Not supported. | 88 // The session object provided to the presentation page. Not supported. |
87 Member<PresentationSession> m_session; | 89 Member<PresentationSession> m_session; |
88 | 90 |
89 // The sessions opened for this frame. | 91 // The sessions opened for this frame. |
90 HeapHashSet<Member<PresentationSession>> m_openSessions; | 92 HeapHashSet<Member<PresentationSession>> m_openSessions; |
91 }; | 93 }; |
92 | 94 |
93 } // namespace blink | 95 } // namespace blink |
94 | 96 |
95 #endif // Presentation_h | 97 #endif // Presentation_h |
OLD | NEW |