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

Side by Side Diff: services/ui/service.h

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 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
« no previous file with comments | « services/ui/public/cpp/tests/window_server_test_base.cc ('k') | services/ui/service.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 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 #ifndef SERVICES_UI_SERVICE_H_ 5 #ifndef SERVICES_UI_SERVICE_H_
6 #define SERVICES_UI_SERVICE_H_ 6 #define SERVICES_UI_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "services/shell/public/cpp/application_runner.h" 17 #include "services/shell/public/cpp/application_runner.h"
18 #include "services/shell/public/cpp/interface_factory.h" 18 #include "services/shell/public/cpp/interface_factory.h"
19 #include "services/shell/public/cpp/shell_client.h" 19 #include "services/shell/public/cpp/service.h"
20 #include "services/tracing/public/cpp/tracing_impl.h" 20 #include "services/tracing/public/cpp/tracing_impl.h"
21 #include "services/ui/input_devices/input_device_server.h" 21 #include "services/ui/input_devices/input_device_server.h"
22 #include "services/ui/public/interfaces/clipboard.mojom.h" 22 #include "services/ui/public/interfaces/clipboard.mojom.h"
23 #include "services/ui/public/interfaces/display.mojom.h" 23 #include "services/ui/public/interfaces/display.mojom.h"
24 #include "services/ui/public/interfaces/gpu.mojom.h" 24 #include "services/ui/public/interfaces/gpu.mojom.h"
25 #include "services/ui/public/interfaces/gpu_service.mojom.h" 25 #include "services/ui/public/interfaces/gpu_service.mojom.h"
26 #include "services/ui/public/interfaces/user_access_manager.mojom.h" 26 #include "services/ui/public/interfaces/user_access_manager.mojom.h"
27 #include "services/ui/public/interfaces/user_activity_monitor.mojom.h" 27 #include "services/ui/public/interfaces/user_activity_monitor.mojom.h"
28 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h" 28 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h"
29 #include "services/ui/public/interfaces/window_server_test.mojom.h" 29 #include "services/ui/public/interfaces/window_server_test.mojom.h"
(...skipping 21 matching lines...) Expand all
51 } 51 }
52 52
53 namespace ui { 53 namespace ui {
54 namespace ws { 54 namespace ws {
55 class ForwardingWindowManager; 55 class ForwardingWindowManager;
56 class PlatformScreen; 56 class PlatformScreen;
57 class WindowServer; 57 class WindowServer;
58 } 58 }
59 59
60 class Service 60 class Service
61 : public shell::ShellClient, 61 : public shell::Service,
62 public ws::WindowServerDelegate, 62 public ws::WindowServerDelegate,
63 public shell::InterfaceFactory<mojom::Clipboard>, 63 public shell::InterfaceFactory<mojom::Clipboard>,
64 public shell::InterfaceFactory<mojom::DisplayManager>, 64 public shell::InterfaceFactory<mojom::DisplayManager>,
65 public shell::InterfaceFactory<mojom::Gpu>, 65 public shell::InterfaceFactory<mojom::Gpu>,
66 public shell::InterfaceFactory<mojom::GpuService>, 66 public shell::InterfaceFactory<mojom::GpuService>,
67 public shell::InterfaceFactory<mojom::UserAccessManager>, 67 public shell::InterfaceFactory<mojom::UserAccessManager>,
68 public shell::InterfaceFactory<mojom::UserActivityMonitor>, 68 public shell::InterfaceFactory<mojom::UserActivityMonitor>,
69 public shell::InterfaceFactory<mojom::WindowManagerWindowTreeFactory>, 69 public shell::InterfaceFactory<mojom::WindowManagerWindowTreeFactory>,
70 public shell::InterfaceFactory<mojom::WindowTreeFactory>, 70 public shell::InterfaceFactory<mojom::WindowTreeFactory>,
71 public shell::InterfaceFactory<mojom::WindowTreeHostFactory>, 71 public shell::InterfaceFactory<mojom::WindowTreeHostFactory>,
(...skipping 13 matching lines...) Expand all
85 void InitializeResources(shell::Connector* connector); 85 void InitializeResources(shell::Connector* connector);
86 86
87 // Returns the user specific state for the user id of |connection|. Service 87 // Returns the user specific state for the user id of |connection|. Service
88 // owns the return value. 88 // owns the return value.
89 // TODO(sky): if we allow removal of user ids then we need to close anything 89 // TODO(sky): if we allow removal of user ids then we need to close anything
90 // associated with the user (all incoming pipes...) on removal. 90 // associated with the user (all incoming pipes...) on removal.
91 UserState* GetUserState(shell::Connection* connection); 91 UserState* GetUserState(shell::Connection* connection);
92 92
93 void AddUserIfNecessary(shell::Connection* connection); 93 void AddUserIfNecessary(shell::Connection* connection);
94 94
95 // shell::ShellClient: 95 // shell::Service:
96 void Initialize(shell::Connector* connector, 96 void OnStart(shell::Connector* connector,
97 const shell::Identity& identity, 97 const shell::Identity& identity,
98 uint32_t id) override; 98 uint32_t id) override;
99 bool AcceptConnection(shell::Connection* connection) override; 99 bool OnConnect(shell::Connection* connection) override;
100 100
101 // WindowServerDelegate: 101 // WindowServerDelegate:
102 void OnFirstDisplayReady() override; 102 void OnFirstDisplayReady() override;
103 void OnNoMoreDisplays() override; 103 void OnNoMoreDisplays() override;
104 bool IsTestConfig() const override; 104 bool IsTestConfig() const override;
105 void CreateDefaultDisplays() override; 105 void CreateDefaultDisplays() override;
106 106
107 // shell::InterfaceFactory<mojom::Clipboard> implementation. 107 // shell::InterfaceFactory<mojom::Clipboard> implementation.
108 void Create(shell::Connection* connection, 108 void Create(shell::Connection* connection,
109 mojom::ClipboardRequest request) override; 109 mojom::ClipboardRequest request) override;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 std::unique_ptr<ws::TouchController> touch_controller_; 173 std::unique_ptr<ws::TouchController> touch_controller_;
174 174
175 base::WeakPtrFactory<Service> weak_ptr_factory_; 175 base::WeakPtrFactory<Service> weak_ptr_factory_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(Service); 177 DISALLOW_COPY_AND_ASSIGN(Service);
178 }; 178 };
179 179
180 } // namespace ui 180 } // namespace ui
181 181
182 #endif // SERVICES_UI_SERVICE_H_ 182 #endif // SERVICES_UI_SERVICE_H_
OLDNEW
« no previous file with comments | « services/ui/public/cpp/tests/window_server_test_base.cc ('k') | services/ui/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698