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

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

Issue 1015903002: [Presentation API] Adds close method to Presentation session. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addresses whywhat's comments 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 void PresentationController::joinSession(const String& presentationUrl, const St ring& presentationId, WebPresentationSessionClientCallbacks* callbacks) 98 void PresentationController::joinSession(const String& presentationUrl, const St ring& presentationId, WebPresentationSessionClientCallbacks* callbacks)
99 { 99 {
100 if (!m_client) { 100 if (!m_client) {
101 delete callbacks; 101 delete callbacks;
102 return; 102 return;
103 } 103 }
104 m_client->joinSession(presentationUrl, presentationId, callbacks); 104 m_client->joinSession(presentationUrl, presentationId, callbacks);
105 } 105 }
106 106
107 void PresentationController::closeSession(const String& url, const String& prese ntationId)
108 {
109 if (!m_client)
110 return;
111 m_client->closeSession(url, presentationId);
112 }
113
107 void PresentationController::setPresentation(Presentation* presentation) 114 void PresentationController::setPresentation(Presentation* presentation)
108 { 115 {
109 m_presentation = presentation; 116 m_presentation = presentation;
110 } 117 }
111 118
112 void PresentationController::willDetachFrameHost() 119 void PresentationController::willDetachFrameHost()
113 { 120 {
114 if (m_client) { 121 if (m_client) {
115 m_client->setController(nullptr); 122 m_client->setController(nullptr);
116 m_client = nullptr; 123 m_client = nullptr;
117 } 124 }
118 } 125 }
119 126
120 } // namespace blink 127 } // 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