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

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

Issue 1209473003: Marks session as connected upon StartSession success (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 m_client->updateAvailableChangeWatched(watched); 75 m_client->updateAvailableChangeWatched(watched);
76 } 76 }
77 77
78 void PresentationController::didStartDefaultSession(WebPresentationSessionClient * sessionClient) 78 void PresentationController::didStartDefaultSession(WebPresentationSessionClient * sessionClient)
79 { 79 {
80 if (!m_presentation) { 80 if (!m_presentation) {
81 PresentationSession::dispose(sessionClient); 81 PresentationSession::dispose(sessionClient);
82 return; 82 return;
83 } 83 }
84 84
85 PresentationSession* session = PresentationSession::take(sessionClient, m_pr esentation); 85 PresentationSession* session = PresentationSession::take(sessionClient, m_pr esentation, WebPresentationSessionState::Connected);
86 m_presentation->didStartDefaultSession(session); 86 m_presentation->didStartDefaultSession(session);
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 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 void PresentationController::willDetachFrameHost() 156 void PresentationController::willDetachFrameHost()
157 { 157 {
158 if (m_client) { 158 if (m_client) {
159 m_client->setController(nullptr); 159 m_client->setController(nullptr);
160 m_client = nullptr; 160 m_client = nullptr;
161 } 161 }
162 } 162 }
163 163
164 } // namespace blink 164 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/modules/presentation/PresentationSession.h » ('j') | Source/modules/presentation/PresentationSession.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698