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

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

Issue 242763003: Implement a trivial Mojo EchoService that can be connected to over DBus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dropped logging in dbus_echo_service to VLOG Created 6 years, 8 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
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/service_manager/service_manager.h" 8 #include "mojo/service_manager/service_manager.h"
9 #include "mojo/shell/keep_alive.h" 9 #include "mojo/shell/keep_alive.h"
10 #include "mojo/shell/loader.h" 10 #include "mojo/shell/loader.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 19
20 class Spy; 20 class Spy;
21 21
22 namespace shell { 22 namespace shell {
23 23
24 class DBusServiceLoader;
24 class DynamicServiceLoader; 25 class DynamicServiceLoader;
25 26
26 // The "global" context for the shell's main process. 27 // The "global" context for the shell's main process.
27 class Context { 28 class Context {
28 public: 29 public:
29 Context(); 30 Context();
30 ~Context(); 31 ~Context();
31 32
32 TaskRunners* task_runners() { return &task_runners_; } 33 TaskRunners* task_runners() { return &task_runners_; }
33 Storage* storage() { return &storage_; } 34 Storage* storage() { return &storage_; }
34 Loader* loader() { return &loader_; } 35 Loader* loader() { return &loader_; }
35 ServiceManager* service_manager() { return &service_manager_; } 36 ServiceManager* service_manager() { return &service_manager_; }
36 KeepAliveCounter* keep_alive_counter() { return &keep_alive_counter_; } 37 KeepAliveCounter* keep_alive_counter() { return &keep_alive_counter_; }
37 38
38 #if defined(OS_ANDROID) 39 #if defined(OS_ANDROID)
39 jobject activity() const { return activity_.obj(); } 40 jobject activity() const { return activity_.obj(); }
40 void set_activity(jobject activity) { activity_.Reset(NULL, activity); } 41 void set_activity(jobject activity) { activity_.Reset(NULL, activity); }
41 #endif // defined(OS_ANDROID) 42 #endif // defined(OS_ANDROID)
42 43
43 private: 44 private:
44 class NativeViewportServiceLoader; 45 class NativeViewportServiceLoader;
45 TaskRunners task_runners_; 46 TaskRunners task_runners_;
46 Storage storage_; 47 Storage storage_;
47 Loader loader_; 48 Loader loader_;
48 ServiceManager service_manager_; 49 ServiceManager service_manager_;
50 scoped_ptr<DBusServiceLoader> dbus_service_loader_;
viettrungluu 2014/04/18 19:40:15 FYI: I believe Dave is working on making the Servi
49 scoped_ptr<DynamicServiceLoader> dynamic_service_loader_; 51 scoped_ptr<DynamicServiceLoader> dynamic_service_loader_;
50 scoped_ptr<Spy> spy_; 52 scoped_ptr<Spy> spy_;
51 scoped_ptr<NativeViewportServiceLoader> native_viewport_service_loader_; 53 scoped_ptr<NativeViewportServiceLoader> native_viewport_service_loader_;
52 #if defined(OS_ANDROID) 54 #if defined(OS_ANDROID)
53 base::android::ScopedJavaGlobalRef<jobject> activity_; 55 base::android::ScopedJavaGlobalRef<jobject> activity_;
54 #endif // defined(OS_ANDROID) 56 #endif // defined(OS_ANDROID)
55 57
56 KeepAliveCounter keep_alive_counter_; 58 KeepAliveCounter keep_alive_counter_;
57 59
58 DISALLOW_COPY_AND_ASSIGN(Context); 60 DISALLOW_COPY_AND_ASSIGN(Context);
59 }; 61 };
60 62
61 } // namespace shell 63 } // namespace shell
62 } // namespace mojo 64 } // namespace mojo
63 65
64 #endif // MOJO_SHELL_CONTEXT_H_ 66 #endif // MOJO_SHELL_CONTEXT_H_
OLDNEW
« mojo/services/dbus_echo/echo.mojom ('K') | « mojo/shell/DEPS ('k') | mojo/shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698