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

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

Issue 1002293005: [PresentationAPI] Plumbing send() from PresentationSession IDL to platform/. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 void PresentationController::joinSession(const String& presentationUrl, const St ring& presentationId, WebPresentationSessionClientCallbacks* callbacks) 106 void PresentationController::joinSession(const String& presentationUrl, const St ring& presentationId, WebPresentationSessionClientCallbacks* callbacks)
107 { 107 {
108 if (!m_client) { 108 if (!m_client) {
109 delete callbacks; 109 delete callbacks;
110 return; 110 return;
111 } 111 }
112 m_client->joinSession(presentationUrl, presentationId, callbacks); 112 m_client->joinSession(presentationUrl, presentationId, callbacks);
113 } 113 }
114 114
115 void PresentationController::postMessage(const String& url, const String& presen tationId, const String& message)
116 {
117 if (!m_client)
118 return;
119 m_client->postMessage(url, presentationId, message);
120 }
121
115 void PresentationController::closeSession(const String& url, const String& prese ntationId) 122 void PresentationController::closeSession(const String& url, const String& prese ntationId)
116 { 123 {
117 if (!m_client) 124 if (!m_client)
118 return; 125 return;
119 m_client->closeSession(url, presentationId); 126 m_client->closeSession(url, presentationId);
120 } 127 }
121 128
122 void PresentationController::setPresentation(Presentation* presentation) 129 void PresentationController::setPresentation(Presentation* presentation)
123 { 130 {
124 m_presentation = presentation; 131 m_presentation = presentation;
125 } 132 }
126 133
127 void PresentationController::willDetachFrameHost() 134 void PresentationController::willDetachFrameHost()
128 { 135 {
129 if (m_client) { 136 if (m_client) {
130 m_client->setController(nullptr); 137 m_client->setController(nullptr);
131 m_client = nullptr; 138 m_client = nullptr;
132 } 139 }
133 } 140 }
134 141
135 } // namespace blink 142 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698