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/application/public/cpp/application_impl.h" | 5 #include "mojo/application/public/cpp/application_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "mojo/application/public/cpp/application_delegate.h" | 11 #include "mojo/application/public/cpp/application_delegate.h" |
12 #include "mojo/application/public/cpp/lib/service_registry.h" | 12 #include "mojo/application/public/cpp/lib/service_registry.h" |
13 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h" | 13 #include "mojo/public/cpp/bindings/interface_ptr.h" |
14 #include "third_party/mojo/src/mojo/public/cpp/environment/logging.h" | 14 #include "mojo/public/cpp/environment/logging.h" |
15 | 15 |
16 namespace mojo { | 16 namespace mojo { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 void DefaultTerminationClosure() { | 20 void DefaultTerminationClosure() { |
21 if (base::MessageLoop::current() && | 21 if (base::MessageLoop::current() && |
22 base::MessageLoop::current()->is_running()) | 22 base::MessageLoop::current()->is_running()) |
23 base::MessageLoop::current()->QuitWhenIdle(); | 23 base::MessageLoop::current()->QuitWhenIdle(); |
24 } | 24 } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 | 160 |
161 void ApplicationImpl::UnbindConnections( | 161 void ApplicationImpl::UnbindConnections( |
162 InterfaceRequest<Application>* application_request, | 162 InterfaceRequest<Application>* application_request, |
163 ShellPtr* shell) { | 163 ShellPtr* shell) { |
164 *application_request = binding_.Unbind(); | 164 *application_request = binding_.Unbind(); |
165 shell->Bind(shell_.PassInterface()); | 165 shell->Bind(shell_.PassInterface()); |
166 } | 166 } |
167 | 167 |
168 } // namespace mojo | 168 } // namespace mojo |
OLD | NEW |