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

Side by Side Diff: Source/modules/presentation/PresentationController.cpp

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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "config.h" 5 #include "config.h"
6 #include "modules/presentation/PresentationController.h" 6 #include "modules/presentation/PresentationController.h"
7 7
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "modules/presentation/PresentationSession.h" 9 #include "modules/presentation/PresentationSession.h"
10 #include "public/platform/modules/presentation/WebPresentationClient.h" 10 #include "public/platform/modules/presentation/WebPresentationClient.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 void PresentationController::didChangeSessionState(WebPresentationSessionClient* sessionClient, WebPresentationSessionState state) 89 void PresentationController::didChangeSessionState(WebPresentationSessionClient* sessionClient, WebPresentationSessionState state)
90 { 90 {
91 if (m_presentation) 91 if (m_presentation)
92 m_presentation->didChangeSessionState(sessionClient, state); 92 m_presentation->didChangeSessionState(sessionClient, state);
93 else 93 else
94 PresentationSession::dispose(sessionClient); 94 PresentationSession::dispose(sessionClient);
95 } 95 }
96 96
97 void PresentationController::didReceiveSessionTextMessage(WebPresentationSession Client* sessionClient, const WebString& message)
98 {
99 if (m_presentation)
100 m_presentation->didReceiveSessionTextMessage(sessionClient, message);
101 else
102 PresentationSession::dispose(sessionClient);
103 }
104
97 void PresentationController::startSession(const String& presentationUrl, const S tring& presentationId, WebPresentationSessionClientCallbacks* callbacks) 105 void PresentationController::startSession(const String& presentationUrl, const S tring& presentationId, WebPresentationSessionClientCallbacks* callbacks)
98 { 106 {
99 if (!m_client) { 107 if (!m_client) {
100 delete callbacks; 108 delete callbacks;
101 return; 109 return;
102 } 110 }
103 m_client->startSession(presentationUrl, presentationId, callbacks); 111 m_client->startSession(presentationUrl, presentationId, callbacks);
104 } 112 }
105 113
106 void PresentationController::joinSession(const String& presentationUrl, const St ring& presentationId, WebPresentationSessionClientCallbacks* callbacks) 114 void PresentationController::joinSession(const String& presentationUrl, const St ring& presentationId, WebPresentationSessionClientCallbacks* callbacks)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 148
141 void PresentationController::willDetachFrameHost() 149 void PresentationController::willDetachFrameHost()
142 { 150 {
143 if (m_client) { 151 if (m_client) {
144 m_client->setController(nullptr); 152 m_client->setController(nullptr);
145 m_client = nullptr; 153 m_client = nullptr;
146 } 154 }
147 } 155 }
148 156
149 } // namespace blink 157 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/presentation/PresentationController.h ('k') | Source/modules/presentation/PresentationSession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698