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

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

Issue 1402533003: Don't use base::MessageLoop::{Quit,QuitClosure} in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/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 "mojo/public/cpp/bindings/interface_ptr.h" 13 #include "mojo/public/cpp/bindings/interface_ptr.h"
14 #include "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()->Quit(); 23 base::MessageLoop::current()->QuitWhenIdle();
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 ApplicationImpl::ApplicationImpl(ApplicationDelegate* delegate, 28 ApplicationImpl::ApplicationImpl(ApplicationDelegate* delegate,
29 InterfaceRequest<Application> request) 29 InterfaceRequest<Application> request)
30 : ApplicationImpl(delegate, request.Pass(), 30 : ApplicationImpl(delegate, request.Pass(),
31 base::Bind(&DefaultTerminationClosure)) { 31 base::Bind(&DefaultTerminationClosure)) {
32 } 32 }
33 33
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 void ApplicationImpl::UnbindConnections( 149 void ApplicationImpl::UnbindConnections(
150 InterfaceRequest<Application>* application_request, 150 InterfaceRequest<Application>* application_request,
151 ShellPtr* shell) { 151 ShellPtr* shell) {
152 *application_request = binding_.Unbind(); 152 *application_request = binding_.Unbind();
153 shell->Bind(shell_.PassInterface()); 153 shell->Bind(shell_.PassInterface());
154 } 154 }
155 155
156 } // namespace mojo 156 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/android/system/base_run_loop.cc ('k') | mojo/runner/android/background_application_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698