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

Side by Side Diff: Source/modules/presentation/Presentation.h

Issue 1206513004: [PresentationAPI] on-session-message handler for binary messages (Blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: generic interface to receive binary messages. Created 5 years, 5 months 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 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
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 didReceiveSessionBinaryMessage(WebPresentationSessionClient*, const uin t8_t* data, size_t length);
72 73
73 // Adds a session to the open sessions list. 74 // Adds a session to the open sessions list.
74 void registerSession(PresentationSession*); 75 void registerSession(PresentationSession*);
75 76
76 private: 77 private:
77 explicit Presentation(LocalFrame*); 78 explicit Presentation(LocalFrame*);
78 79
79 // Returns the |PresentationController| object associated with the frame |Pr esentation| corresponds to. 80 // Returns the |PresentationController| object associated with the frame |Pr esentation| corresponds to.
80 // Can return |nullptr| if the frame is detached from the document. 81 // Can return |nullptr| if the frame is detached from the document.
81 PresentationController* presentationController(); 82 PresentationController* presentationController();
82 83
83 // Returns the session that matches the WebPresentationSessionClient or null . 84 // Returns the session that matches the WebPresentationSessionClient or null .
84 PresentationSession* findSession(WebPresentationSessionClient*); 85 PresentationSession* findSession(WebPresentationSessionClient*);
85 86
86 // The session object provided to the presentation page. Not supported. 87 // The session object provided to the presentation page. Not supported.
87 Member<PresentationSession> m_session; 88 Member<PresentationSession> m_session;
88 89
89 // The sessions opened for this frame. 90 // The sessions opened for this frame.
90 HeapHashSet<Member<PresentationSession>> m_openSessions; 91 HeapHashSet<Member<PresentationSession>> m_openSessions;
91 }; 92 };
92 93
93 } // namespace blink 94 } // namespace blink
94 95
95 #endif // Presentation_h 96 #endif // Presentation_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/presentation/Presentation.cpp » ('j') | Source/modules/presentation/PresentationSession.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698