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

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: fix chromecast build 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') | 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 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"
29 30
30 #if defined(USE_OZONE) 31 #if defined(USE_OZONE)
31 #include "ui/ozone/public/client_native_pixmap_factory.h" 32 #include "ui/ozone/public/client_native_pixmap_factory.h"
32 #endif 33 #endif
33 34
35 namespace gfx {
36 class Rect;
37 }
38
34 namespace shell { 39 namespace shell {
35 class Connector; 40 class Connector;
36 } 41 }
37 42
38 namespace ui { 43 namespace ui {
39 class PlatformEventSource; 44 class PlatformEventSource;
40 } 45 }
41 46
42 namespace mus { 47 namespace mus {
43 namespace ws { 48 namespace ws {
44 class ForwardingWindowManager; 49 class ForwardingWindowManager;
50 class PlatformScreen;
45 class WindowServer; 51 class WindowServer;
46 } 52 }
47 53
48 class MandolineUIServicesApp 54 class MandolineUIServicesApp
49 : public shell::ShellClient, 55 : public shell::ShellClient,
50 public ws::WindowServerDelegate, 56 public ws::WindowServerDelegate,
51 public shell::InterfaceFactory<mojom::DisplayManager>, 57 public shell::InterfaceFactory<mojom::DisplayManager>,
52 public shell::InterfaceFactory<mojom::UserAccessManager>, 58 public shell::InterfaceFactory<mojom::UserAccessManager>,
53 public shell::InterfaceFactory<mojom::WindowManagerFactoryService>, 59 public shell::InterfaceFactory<mojom::WindowManagerFactoryService>,
54 public shell::InterfaceFactory<mojom::WindowTreeFactory>, 60 public shell::InterfaceFactory<mojom::WindowTreeFactory>,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 mojom::WindowTreeHostFactoryRequest request) override; 116 mojom::WindowTreeHostFactoryRequest request) override;
111 117
112 // shell::InterfaceFactory<mojom::WindowServerTest> implementation. 118 // shell::InterfaceFactory<mojom::WindowServerTest> implementation.
113 void Create(shell::Connection* connection, 119 void Create(shell::Connection* connection,
114 mojom::WindowServerTestRequest request) override; 120 mojom::WindowServerTestRequest request) override;
115 121
116 // shell::InterfaceFactory<mojom::Gpu> implementation. 122 // shell::InterfaceFactory<mojom::Gpu> implementation.
117 void Create(shell::Connection* connection, 123 void Create(shell::Connection* connection,
118 mojom::GpuRequest request) override; 124 mojom::GpuRequest request) override;
119 125
126 // Callback for display configuration. |id| is the identifying token for the
127 // configured display that will identify a specific physical display across
128 // configuration changes. |bounds| is the bounds of the display in screen
129 // coordinates.
130 void OnCreatedPhysicalDisplay(int64_t id, const gfx::Rect& bounds);
131
120 ws::PlatformDisplayInitParams platform_display_init_params_; 132 ws::PlatformDisplayInitParams platform_display_init_params_;
121 std::unique_ptr<ws::WindowServer> window_server_; 133 std::unique_ptr<ws::WindowServer> window_server_;
122 std::unique_ptr<ui::PlatformEventSource> event_source_; 134 std::unique_ptr<ui::PlatformEventSource> event_source_;
123 mojo::TracingImpl tracing_; 135 mojo::TracingImpl tracing_;
124 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>; 136 using PendingRequests = std::vector<std::unique_ptr<PendingRequest>>;
125 PendingRequests pending_requests_; 137 PendingRequests pending_requests_;
126 138
127 UserIdToUserState user_id_to_user_state_; 139 UserIdToUserState user_id_to_user_state_;
128 140
129 bool test_config_; 141 bool test_config_;
130 #if defined(USE_OZONE) 142 #if defined(USE_OZONE)
131 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; 143 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_;
132 #endif 144 #endif
133 145
146 std::unique_ptr<ws::PlatformScreen> platform_screen_;
147
148 base::WeakPtrFactory<MandolineUIServicesApp> weak_ptr_factory_;
149
134 DISALLOW_COPY_AND_ASSIGN(MandolineUIServicesApp); 150 DISALLOW_COPY_AND_ASSIGN(MandolineUIServicesApp);
135 }; 151 };
136 152
137 } // namespace mus 153 } // namespace mus
138 154
139 #endif // COMPONENTS_MUS_MUS_APP_H_ 155 #endif // COMPONENTS_MUS_MUS_APP_H_
OLDNEW
« no previous file with comments | « no previous file | components/mus/mus_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698