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

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

Issue 1296453004: Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cherry-pick GL_APIENTRY addition back in 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_error_handler(this); 172 binding_->set_connection_error_handler([this]() {
173 } 173 DVLOG(1) << "Connection error";
174 174 delete this;
175 void PresentationServiceImpl::OnConnectionError() { 175 });
176 DVLOG(1) << "OnConnectionError";
177 delete this;
178 } 176 }
179 177
180 void PresentationServiceImpl::SetClient( 178 void PresentationServiceImpl::SetClient(
181 presentation::PresentationServiceClientPtr client) { 179 presentation::PresentationServiceClientPtr client) {
182 DCHECK(!client_.get()); 180 DCHECK(!client_.get());
183 // TODO(imcheng): Set ErrorHandler to listen for errors. 181 // TODO(imcheng): Set ErrorHandler to listen for errors.
184 client_ = client.Pass(); 182 client_ = client.Pass();
185 } 183 }
186 184
187 void PresentationServiceImpl::ListenForScreenAvailability( 185 void PresentationServiceImpl::ListenForScreenAvailability(
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 627
630 void PresentationServiceImpl::DefaultSessionStartContext::Reset() { 628 void PresentationServiceImpl::DefaultSessionStartContext::Reset() {
631 ScopedVector<DefaultSessionMojoCallback> callbacks; 629 ScopedVector<DefaultSessionMojoCallback> callbacks;
632 callbacks.swap(callbacks_); 630 callbacks.swap(callbacks_);
633 for (const auto& callback : callbacks) 631 for (const auto& callback : callbacks)
634 callback->Run(presentation::PresentationSessionInfoPtr()); 632 callback->Run(presentation::PresentationSessionInfoPtr());
635 session_.reset(); 633 session_.reset();
636 } 634 }
637 635
638 } // namespace content 636 } // 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