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

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

Issue 122173004: Add test for ServiceManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update new copyrights Created 6 years, 11 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/shell/android/mojo_main.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 "mojo/common/bindings_support_impl.h" 8 #include "mojo/common/bindings_support_impl.h"
9 #include "mojo/shell/loader.h" 9 #include "mojo/shell/loader.h"
10 #include "mojo/shell/service_manager.h" 10 #include "mojo/shell/service_manager.h"
11 #include "mojo/shell/storage.h" 11 #include "mojo/shell/storage.h"
12 #include "mojo/shell/task_runners.h" 12 #include "mojo/shell/task_runners.h"
13 13
14 #if defined(OS_ANDROID) 14 #if defined(OS_ANDROID)
15 #include "base/android/scoped_java_ref.h" 15 #include "base/android/scoped_java_ref.h"
16 #endif // defined(OS_ANDROID) 16 #endif // defined(OS_ANDROID)
17 17
18 namespace mojo { 18 namespace mojo {
19 namespace shell { 19 namespace shell {
20 20
21 class DynamicServiceLoader;
22
21 class Context { 23 class Context {
22 public: 24 public:
23 Context(); 25 Context();
24 ~Context(); 26 ~Context();
25 27
26 TaskRunners* task_runners() { return &task_runners_; } 28 TaskRunners* task_runners() { return &task_runners_; }
27 Storage* storage() { return &storage_; } 29 Storage* storage() { return &storage_; }
28 Loader* loader() { return &loader_; } 30 Loader* loader() { return &loader_; }
29 ServiceManager* service_manager() { return service_manager_.get(); } 31 ServiceManager* service_manager() { return &service_manager_; }
30 32
31 #if defined(OS_ANDROID) 33 #if defined(OS_ANDROID)
32 jobject activity() const { return activity_.obj(); } 34 jobject activity() const { return activity_.obj(); }
33 void set_activity(jobject activity) { activity_.Reset(NULL, activity); } 35 void set_activity(jobject activity) { activity_.Reset(NULL, activity); }
34 #endif // defined(OS_ANDROID) 36 #endif // defined(OS_ANDROID)
35 37
36 private: 38 private:
37 TaskRunners task_runners_; 39 TaskRunners task_runners_;
38 Storage storage_; 40 Storage storage_;
39 Loader loader_; 41 Loader loader_;
42 ServiceManager service_manager_;
40 common::BindingsSupportImpl bindings_support_impl_; 43 common::BindingsSupportImpl bindings_support_impl_;
41 scoped_ptr<ServiceManager> service_manager_; 44 scoped_ptr<DynamicServiceLoader> dynamic_service_loader_;
42 45
43 #if defined(OS_ANDROID) 46 #if defined(OS_ANDROID)
44 base::android::ScopedJavaGlobalRef<jobject> activity_; 47 base::android::ScopedJavaGlobalRef<jobject> activity_;
45 #endif // defined(OS_ANDROID) 48 #endif // defined(OS_ANDROID)
46 49
47 DISALLOW_COPY_AND_ASSIGN(Context); 50 DISALLOW_COPY_AND_ASSIGN(Context);
48 }; 51 };
49 52
50 } // namespace shell 53 } // namespace shell
51 } // namespace mojo 54 } // namespace mojo
52 55
53 #endif // MOJO_SHELL_CONTEXT_H_ 56 #endif // MOJO_SHELL_CONTEXT_H_
OLDNEW
« no previous file with comments | « mojo/shell/android/mojo_main.cc ('k') | mojo/shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698