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

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

Issue 1206513004: [PresentationAPI] on-session-message handler for binary messages (Blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert "add typedef uint8_t for WIN32" Created 5 years, 5 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void PresentationController::didReceiveSessionTextMessage(WebPresentationSession Client* sessionClient, const WebString& message) 85 void PresentationController::didReceiveSessionTextMessage(WebPresentationSession Client* sessionClient, const WebString& message)
86 { 86 {
87 if (!m_presentation) { 87 if (!m_presentation) {
88 delete sessionClient; 88 delete sessionClient;
89 return; 89 return;
90 } 90 }
91 91
92 m_presentation->didReceiveSessionTextMessage(sessionClient, message); 92 m_presentation->didReceiveSessionTextMessage(sessionClient, message);
93 } 93 }
94 94
95 void PresentationController::didReceiveSessionBinaryMessage(WebPresentationSessi onClient* sessionClient, const uint8_t* data, size_t length)
96 {
97 if (!m_presentation) {
98 delete sessionClient;
99 return;
100 }
101
102 m_presentation->didReceiveSessionBinaryMessage(sessionClient, data, length);
103 }
104
95 void PresentationController::setPresentation(Presentation* presentation) 105 void PresentationController::setPresentation(Presentation* presentation)
96 { 106 {
97 m_presentation = presentation; 107 m_presentation = presentation;
98 } 108 }
99 109
100 void PresentationController::willDetachFrameHost() 110 void PresentationController::willDetachFrameHost()
101 { 111 {
102 if (m_client) { 112 if (m_client) {
103 m_client->setController(nullptr); 113 m_client->setController(nullptr);
104 m_client = nullptr; 114 m_client = nullptr;
105 } 115 }
106 } 116 }
107 117
108 } // namespace blink 118 } // 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