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

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: Revert "add typedef uint8_t for WIN32" 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 DEFINE_ATTRIBUTE_EVENT_LISTENER(defaultsessionstart); 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(defaultsessionstart);
52 52
53 // Called when the |defaultsessionstart| event needs to be fired. 53 // Called when the |defaultsessionstart| event needs to be fired.
54 void didStartDefaultSession(PresentationSession*); 54 void didStartDefaultSession(PresentationSession*);
55 55
56 // Called when the |onstatechange| event needs to be fired to the right sess ion. 56 // Called when the |onstatechange| event needs to be fired to the right sess ion.
57 void didChangeSessionState(WebPresentationSessionClient*, WebPresentationSes sionState); 57 void didChangeSessionState(WebPresentationSessionClient*, WebPresentationSes sionState);
58 58
59 // Called when the |onmessage| event needs to be fired to the right session. 59 // Called when the |onmessage| event needs to be fired to the right session.
60 void didReceiveSessionTextMessage(WebPresentationSessionClient*, const Strin g& message); 60 void didReceiveSessionTextMessage(WebPresentationSessionClient*, const Strin g& message);
61 void didReceiveSessionBinaryMessage(WebPresentationSessionClient*, const uin t8_t* data, size_t length);
61 62
62 // Adds a session to the open sessions list. 63 // Adds a session to the open sessions list.
63 void registerSession(PresentationSession*); 64 void registerSession(PresentationSession*);
64 65
65 private: 66 private:
66 explicit Presentation(LocalFrame*); 67 explicit Presentation(LocalFrame*);
67 68
68 // Returns the session that matches the WebPresentationSessionClient or null . 69 // Returns the session that matches the WebPresentationSessionClient or null .
69 PresentationSession* findSession(WebPresentationSessionClient*); 70 PresentationSession* findSession(WebPresentationSessionClient*);
70 71
71 // The session object provided to the presentation page. Not supported. 72 // The session object provided to the presentation page. Not supported.
72 Member<PresentationSession> m_session; 73 Member<PresentationSession> m_session;
73 74
74 // The sessions opened for this frame. 75 // The sessions opened for this frame.
75 HeapHashSet<Member<PresentationSession>> m_openSessions; 76 HeapHashSet<Member<PresentationSession>> m_openSessions;
76 }; 77 };
77 78
78 } // namespace blink 79 } // namespace blink
79 80
80 #endif // Presentation_h 81 #endif // Presentation_h
OLDNEW
« no previous file with comments | « LayoutTests/webexposed/global-interface-listing-expected.txt ('k') | Source/modules/presentation/Presentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698