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

Side by Side Diff: Source/modules/presentation/PresentationSession.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
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 PresentationSession_h 5 #ifndef PresentationSession_h
6 #define PresentationSession_h 6 #define PresentationSession_h
7 7
8 #include "core/events/EventTarget.h" 8 #include "core/events/EventTarget.h"
9 #include "core/frame/DOMWindowProperty.h" 9 #include "core/frame/DOMWindowProperty.h"
10 #include "public/platform/modules/presentation/WebPresentationSessionClient.h" 10 #include "public/platform/modules/presentation/WebPresentationSessionClient.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 49 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
50 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); 50 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
51 51
52 // Returns true if and only if the WebPresentationSessionClient represents t his session. 52 // Returns true if and only if the WebPresentationSessionClient represents t his session.
53 bool matches(WebPresentationSessionClient*) const; 53 bool matches(WebPresentationSessionClient*) const;
54 54
55 // Notifies the session about its state change. 55 // Notifies the session about its state change.
56 void didChangeState(WebPresentationSessionState); 56 void didChangeState(WebPresentationSessionState);
57 57
58 // Notifies the session about new text message.
59 void didReceiveTextMessage(const String& message);
60
58 private: 61 private:
59 PresentationSession(LocalFrame*, const String& id, const String& url); 62 PresentationSession(LocalFrame*, const String& id, const String& url);
60 63
61 // Returns the |PresentationController| object associated with the frame 64 // Returns the |PresentationController| object associated with the frame
62 // |Presentation| corresponds to. Can return |nullptr| if the frame is 65 // |Presentation| corresponds to. Can return |nullptr| if the frame is
63 // detached from the document. 66 // detached from the document.
64 PresentationController* presentationController(); 67 PresentationController* presentationController();
65 68
66 // Common send method for both ArrayBufferView and ArrayBuffer. 69 // Common send method for both ArrayBufferView and ArrayBuffer.
67 void sendInternal(const uint8_t* data, size_t, ExceptionState&); 70 void sendInternal(const uint8_t* data, size_t, ExceptionState&);
68 71
69 String m_id; 72 String m_id;
70 String m_url; 73 String m_url;
71 WebPresentationSessionState m_state; 74 WebPresentationSessionState m_state;
72 }; 75 };
73 76
74 } // namespace blink 77 } // namespace blink
75 78
76 #endif // PresentationSession_h 79 #endif // PresentationSession_h
OLDNEW
« no previous file with comments | « Source/modules/presentation/PresentationController.cpp ('k') | Source/modules/presentation/PresentationSession.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698