| OLD | NEW | 
|---|
| 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 | 
| OLD | NEW | 
|---|