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

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

Issue 1985223003: Factor stuff from ApplicationImpl out to a new class, ApplicationImplBase. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_app_test_base_no_app_impl
Patch Set: fix android 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
« no previous file with comments | « mojo/public/cpp/application/lib/application_impl_base.cc ('k') | mojo/ui/view_provider_app.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_runner.h" 5 #include "mojo/public/cpp/application/application_runner.h"
6 6
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/public/cpp/application/application_impl_base.h"
9 #include "mojo/public/cpp/environment/environment.h" 10 #include "mojo/public/cpp/environment/environment.h"
10 #include "mojo/public/cpp/environment/logging.h" 11 #include "mojo/public/cpp/environment/logging.h"
11 #include "mojo/public/cpp/utility/run_loop.h" 12 #include "mojo/public/cpp/utility/run_loop.h"
12 13
13 namespace mojo { 14 namespace mojo {
14 namespace { 15 namespace {
15 bool g_running = false; 16 bool g_running = false;
16 } // namespace 17 } // namespace
17 18
18 // static 19 // static
19 void ApplicationImpl::Terminate() { 20 void ApplicationImplBase::Terminate() {
vardhan 2016/05/17 23:36:52 feels weird that this is defined here. is there a
viettrungluu 2016/05/17 23:42:50 Yeah, but it'll require a bunch of work.
20 RunLoop::current()->Quit(); 21 RunLoop::current()->Quit();
21 } 22 }
22 23
23 ApplicationRunner::ApplicationRunner( 24 ApplicationRunner::ApplicationRunner(
24 std::unique_ptr<ApplicationDelegate> delegate) 25 std::unique_ptr<ApplicationDelegate> delegate)
25 : delegate_(std::move(delegate)) {} 26 : delegate_(std::move(delegate)) {}
26 27
27 ApplicationRunner::~ApplicationRunner() { 28 ApplicationRunner::~ApplicationRunner() {
28 assert(!delegate_); 29 assert(!delegate_);
29 } 30 }
(...skipping 25 matching lines...) Expand all
55 } 56 }
56 57
57 delegate_.reset(); 58 delegate_.reset();
58 59
59 g_running = false; 60 g_running = false;
60 61
61 return MOJO_RESULT_OK; 62 return MOJO_RESULT_OK;
62 } 63 }
63 64
64 } // namespace mojo 65 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/lib/application_impl_base.cc ('k') | mojo/ui/view_provider_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698