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

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

Issue 1092193003: [PresentationAPI] Added on-session-text-message handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Forward declare WebString in WebPresentationController.h Created 5 years, 7 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
« no previous file with comments | « no previous file | Source/modules/presentation/Presentation.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void didChangeAvailability(bool available); 60 void didChangeAvailability(bool available);
61 // Queried by the controller if |availablechange| event has any listeners. 61 // Queried by the controller if |availablechange| event has any listeners.
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.
71 void didReceiveSessionTextMessage(WebPresentationSessionClient*, const Strin g& message);
72
70 // Adds a session to the open sessions list. 73 // Adds a session to the open sessions list.
71 void registerSession(PresentationSession*); 74 void registerSession(PresentationSession*);
72 75
73 private: 76 private:
74 explicit Presentation(LocalFrame*); 77 explicit Presentation(LocalFrame*);
75 78
76 // Returns the |PresentationController| object associated with the frame |Pr esentation| corresponds to. 79 // Returns the |PresentationController| object associated with the frame |Pr esentation| corresponds to.
77 // Can return |nullptr| if the frame is detached from the document. 80 // Can return |nullptr| if the frame is detached from the document.
78 PresentationController* presentationController(); 81 PresentationController* presentationController();
79 82
80 // Returns the session that matches the WebPresentationSessionClient or null . 83 // Returns the session that matches the WebPresentationSessionClient or null .
81 PresentationSession* findSession(WebPresentationSessionClient*); 84 PresentationSession* findSession(WebPresentationSessionClient*);
82 85
83 // The session object provided to the presentation page. Not supported. 86 // The session object provided to the presentation page. Not supported.
84 Member<PresentationSession> m_session; 87 Member<PresentationSession> m_session;
85 88
86 // The sessions opened for this frame. 89 // The sessions opened for this frame.
87 HeapHashSet<Member<PresentationSession>> m_openSessions; 90 HeapHashSet<Member<PresentationSession>> m_openSessions;
88 }; 91 };
89 92
90 } // namespace blink 93 } // namespace blink
91 94
92 #endif // Presentation_h 95 #endif // Presentation_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/presentation/Presentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698