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

Side by Side Diff: components/mus/mus_app.h

Issue 1899923002: Basic display management for mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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 | « no previous file | components/mus/mus_app.cc » ('j') | components/mus/mus_app.cc » ('J')
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 COMPONENTS_MUS_MUS_APP_H_ 5 #ifndef COMPONENTS_MUS_MUS_APP_H_
6 #define COMPONENTS_MUS_MUS_APP_H_ 6 #define COMPONENTS_MUS_MUS_APP_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h"
15 #include "components/mus/public/interfaces/display.mojom.h" 16 #include "components/mus/public/interfaces/display.mojom.h"
16 #include "components/mus/public/interfaces/gpu.mojom.h" 17 #include "components/mus/public/interfaces/gpu.mojom.h"
17 #include "components/mus/public/interfaces/user_access_manager.mojom.h" 18 #include "components/mus/public/interfaces/user_access_manager.mojom.h"
18 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" 19 #include "components/mus/public/interfaces/window_manager_factory.mojom.h"
19 #include "components/mus/public/interfaces/window_server_test.mojom.h" 20 #include "components/mus/public/interfaces/window_server_test.mojom.h"
20 #include "components/mus/public/interfaces/window_tree.mojom.h" 21 #include "components/mus/public/interfaces/window_tree.mojom.h"
21 #include "components/mus/public/interfaces/window_tree_host.mojom.h" 22 #include "components/mus/public/interfaces/window_tree_host.mojom.h"
22 #include "components/mus/ws/platform_display_init_params.h" 23 #include "components/mus/ws/platform_display_init_params.h"
23 #include "components/mus/ws/user_id.h" 24 #include "components/mus/ws/user_id.h"
24 #include "components/mus/ws/window_server_delegate.h" 25 #include "components/mus/ws/window_server_delegate.h"
25 #include "services/shell/public/cpp/application_runner.h" 26 #include "services/shell/public/cpp/application_runner.h"
26 #include "services/shell/public/cpp/interface_factory.h" 27 #include "services/shell/public/cpp/interface_factory.h"
27 #include "services/shell/public/cpp/shell_client.h" 28 #include "services/shell/public/cpp/shell_client.h"
28 #include "services/tracing/public/cpp/tracing_impl.h" 29 #include "services/tracing/public/cpp/tracing_impl.h"
30 #include "ui/gfx/geometry/rect.h"
sky 2016/05/03 02:39:50 forward declare rect.
rjkroege 2016/05/03 21:03:03 Done.
29 31
30 #if defined(USE_OZONE) 32 #if defined(USE_OZONE)
31 #include "ui/ozone/public/client_native_pixmap_factory.h" 33 #include "ui/ozone/public/client_native_pixmap_factory.h"
32 #endif 34 #endif
33 35
34 namespace shell { 36 namespace shell {
35 class Connector; 37 class Connector;
36 } 38 }
37 39
38 namespace ui { 40 namespace ui {
39 class PlatformEventSource; 41 class PlatformEventSource;
40 } 42 }
41 43
42 namespace mus { 44 namespace mus {
43 namespace ws { 45 namespace ws {
44 class ForwardingWindowManager; 46 class ForwardingWindowManager;
47 class PlatformScreen;
45 class WindowServer; 48 class WindowServer;
46 } 49 }
47 50
48 class MandolineUIServicesApp 51 class MandolineUIServicesApp
49 : public shell::ShellClient, 52 : public shell::ShellClient,
50 public ws::WindowServerDelegate, 53 public ws::WindowServerDelegate,
51 public shell::InterfaceFactory<mojom::DisplayManager>, 54 public shell::InterfaceFactory<mojom::DisplayManager>,
52 public shell::InterfaceFactory<mojom::UserAccessManager>, 55 public shell::InterfaceFactory<mojom::UserAccessManager>,
53 public shell::InterfaceFactory<mojom::WindowManagerFactoryService>, 56 public shell::InterfaceFactory<mojom::WindowManagerFactoryService>,
54 public shell::InterfaceFactory<mojom::WindowTreeFactory>, 57 public shell::InterfaceFactory<mojom::WindowTreeFactory>,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 mojom::WindowTreeHostFactoryRequest request) override; 113 mojom::WindowTreeHostFactoryRequest request) override;
111 114
112 // shell::InterfaceFactory<mojom::WindowServerTest> implementation. 115 // shell::InterfaceFactory<mojom::WindowServerTest> implementation.
113 void Create(shell::Connection* connection, 116 void Create(shell::Connection* connection,
114 mojom::WindowServerTestRequest request) override; 117 mojom::WindowServerTestRequest request) override;
115 118
116 // shell::InterfaceFactory<mojom::Gpu> implementation. 119 // shell::InterfaceFactory<mojom::Gpu> implementation.
117 void Create(shell::Connection* connection, 120 void Create(shell::Connection* connection,
118 mojom::GpuRequest request) override; 121 mojom::GpuRequest request) override;
119 122
123 // Callbacks for display configuration.
124 void CreatePhysicalDisplayCallback(int64_t id, gfx::Rect bounds);
sky 2016/05/03 02:39:50 const gfx::Rect&, document what id is, and name th
rjkroege 2016/05/03 21:03:03 Done.
125
120 ws::PlatformDisplayInitParams platform_display_init_params_; 126 ws::PlatformDisplayInitParams platform_display_init_params_;
121 std::unique_ptr<ws::WindowServer> window_server_; 127 std::unique_ptr<ws::WindowServer> window_server_;
122 std::unique_ptr<ui::PlatformEventSource> event_source_; 128 std::unique_ptr<ui::PlatformEventSource> event_source_;
123 mojo::TracingImpl tracing_; 129 mojo::TracingImpl tracing_;
124 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>; 130 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>;
125 PendingRequests pending_requests_; 131 PendingRequests pending_requests_;
126 132
127 UserIdToUserState user_id_to_user_state_; 133 UserIdToUserState user_id_to_user_state_;
128 134
129 bool test_config_; 135 bool test_config_;
130 #if defined(USE_OZONE) 136 #if defined(USE_OZONE)
131 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; 137 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_;
132 #endif 138 #endif
133 139
140 std::unique_ptr<ws::PlatformScreen> platform_screen_;
141
142 base::WeakPtrFactory<MandolineUIServicesApp> weak_ptr_factory_;
143
134 DISALLOW_COPY_AND_ASSIGN(MandolineUIServicesApp); 144 DISALLOW_COPY_AND_ASSIGN(MandolineUIServicesApp);
135 }; 145 };
136 146
137 } // namespace mus 147 } // namespace mus
138 148
139 #endif // COMPONENTS_MUS_MUS_APP_H_ 149 #endif // COMPONENTS_MUS_MUS_APP_H_
OLDNEW
« no previous file with comments | « no previous file | components/mus/mus_app.cc » ('j') | components/mus/mus_app.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698