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

Side by Side Diff: content/browser/presentation/presentation_service_impl.cc

Issue 1311613002: Revert of Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 "content/browser/presentation/presentation_service_impl.h" 5 #include "content/browser/presentation/presentation_service_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 web_contents, 162 web_contents,
163 GetContentClient()->browser()->GetPresentationServiceDelegate( 163 GetContentClient()->browser()->GetPresentationServiceDelegate(
164 web_contents)); 164 web_contents));
165 impl->Bind(request.Pass()); 165 impl->Bind(request.Pass());
166 } 166 }
167 167
168 void PresentationServiceImpl::Bind( 168 void PresentationServiceImpl::Bind(
169 mojo::InterfaceRequest<presentation::PresentationService> request) { 169 mojo::InterfaceRequest<presentation::PresentationService> request) {
170 binding_.reset(new mojo::Binding<presentation::PresentationService>( 170 binding_.reset(new mojo::Binding<presentation::PresentationService>(
171 this, request.Pass())); 171 this, request.Pass()));
172 binding_->set_connection_error_handler([this]() { 172 binding_->set_error_handler(this);
173 DVLOG(1) << "Connection error"; 173 }
174 delete this; 174
175 }); 175 void PresentationServiceImpl::OnConnectionError() {
176 DVLOG(1) << "OnConnectionError";
177 delete this;
176 } 178 }
177 179
178 void PresentationServiceImpl::SetClient( 180 void PresentationServiceImpl::SetClient(
179 presentation::PresentationServiceClientPtr client) { 181 presentation::PresentationServiceClientPtr client) {
180 DCHECK(!client_.get()); 182 DCHECK(!client_.get());
181 // TODO(imcheng): Set ErrorHandler to listen for errors. 183 // TODO(imcheng): Set ErrorHandler to listen for errors.
182 client_ = client.Pass(); 184 client_ = client.Pass();
183 } 185 }
184 186
185 void PresentationServiceImpl::ListenForScreenAvailability( 187 void PresentationServiceImpl::ListenForScreenAvailability(
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 629
628 void PresentationServiceImpl::DefaultSessionStartContext::Reset() { 630 void PresentationServiceImpl::DefaultSessionStartContext::Reset() {
629 ScopedVector<DefaultSessionMojoCallback> callbacks; 631 ScopedVector<DefaultSessionMojoCallback> callbacks;
630 callbacks.swap(callbacks_); 632 callbacks.swap(callbacks_);
631 for (const auto& callback : callbacks) 633 for (const auto& callback : callbacks)
632 callback->Run(presentation::PresentationSessionInfoPtr()); 634 callback->Run(presentation::PresentationSessionInfoPtr());
633 session_.reset(); 635 session_.reset();
634 } 636 }
635 637
636 } // namespace content 638 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/presentation/presentation_service_impl.h ('k') | content/child/navigator_connect/service_port_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698