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

Side by Side Diff: mojo/shell/context.h

Issue 397733003: mojo: kill app_thread before unloading main app library and add tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: also service_manager_unittests Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « mojo/service_manager/service_manager.cc ('k') | mojo/shell/context.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef MOJO_SHELL_CONTEXT_H_ 5 #ifndef MOJO_SHELL_CONTEXT_H_
6 #define MOJO_SHELL_CONTEXT_H_ 6 #define MOJO_SHELL_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "mojo/service_manager/service_manager.h" 10 #include "mojo/service_manager/service_manager.h"
(...skipping 12 matching lines...) Expand all
23 namespace shell { 23 namespace shell {
24 24
25 class DynamicServiceLoader; 25 class DynamicServiceLoader;
26 26
27 // The "global" context for the shell's main process. 27 // The "global" context for the shell's main process.
28 class Context { 28 class Context {
29 public: 29 public:
30 Context(); 30 Context();
31 ~Context(); 31 ~Context();
32 32
33 // Tear down context in safe order prior to deleting. Shutdown() is also
34 // called by the destructor.
35 void Shutdown();
36
33 TaskRunners* task_runners() { return &task_runners_; } 37 TaskRunners* task_runners() { return &task_runners_; }
34 ServiceManager* service_manager() { return &service_manager_; } 38 ServiceManager* service_manager() { return &service_manager_; }
35 KeepAliveCounter* keep_alive_counter() { return &keep_alive_counter_; } 39 KeepAliveCounter* keep_alive_counter() { return &keep_alive_counter_; }
36 MojoURLResolver* mojo_url_resolver() { return &mojo_url_resolver_; } 40 MojoURLResolver* mojo_url_resolver() { return &mojo_url_resolver_; }
37 41
38 #if defined(OS_ANDROID) 42 #if defined(OS_ANDROID)
39 base::MessageLoop* ui_loop() const { return ui_loop_; } 43 base::MessageLoop* ui_loop() const { return ui_loop_; }
40 void set_ui_loop(base::MessageLoop* ui_loop) { ui_loop_ = ui_loop; } 44 void set_ui_loop(base::MessageLoop* ui_loop) { ui_loop_ = ui_loop; }
41 #endif // defined(OS_ANDROID) 45 #endif // defined(OS_ANDROID)
42 46
(...skipping 10 matching lines...) Expand all
53 57
54 KeepAliveCounter keep_alive_counter_; 58 KeepAliveCounter keep_alive_counter_;
55 59
56 DISALLOW_COPY_AND_ASSIGN(Context); 60 DISALLOW_COPY_AND_ASSIGN(Context);
57 }; 61 };
58 62
59 } // namespace shell 63 } // namespace shell
60 } // namespace mojo 64 } // namespace mojo
61 65
62 #endif // MOJO_SHELL_CONTEXT_H_ 66 #endif // MOJO_SHELL_CONTEXT_H_
OLDNEW
« no previous file with comments | « mojo/service_manager/service_manager.cc ('k') | mojo/shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698