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

Side by Side Diff: mojo/public/cpp/application/lib/application_impl.cc

Issue 1993743004: Add ApplicationImplBase::Bind(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/public/cpp/application/application_impl.h" 5 #include "mojo/public/cpp/application/application_impl.h"
6 6
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 10
11 ApplicationImpl::ApplicationImpl(ApplicationDelegate* delegate, 11 ApplicationImpl::ApplicationImpl(ApplicationDelegate* delegate,
12 InterfaceRequest<Application> request) 12 InterfaceRequest<Application> request)
13 : ApplicationImplBase(request.Pass()), delegate_(delegate) {} 13 : delegate_(delegate) {
14 Bind(request.Pass());
15 }
14 16
15 ApplicationImpl::~ApplicationImpl() {} 17 ApplicationImpl::~ApplicationImpl() {}
16 18
17 void ApplicationImpl::OnInitialize() { 19 void ApplicationImpl::OnInitialize() {
18 delegate_->Initialize(this); 20 delegate_->Initialize(this);
19 } 21 }
20 22
21 bool ApplicationImpl::OnAcceptConnection( 23 bool ApplicationImpl::OnAcceptConnection(
22 ServiceProviderImpl* service_provider_impl) { 24 ServiceProviderImpl* service_provider_impl) {
23 return delegate_->ConfigureIncomingConnection(service_provider_impl); 25 return delegate_->ConfigureIncomingConnection(service_provider_impl);
24 } 26 }
25 27
26 void ApplicationImpl::OnQuit() { 28 void ApplicationImpl::OnQuit() {
27 delegate_->Quit(); 29 delegate_->Quit();
28 } 30 }
29 31
30 } // namespace mojo 32 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698