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

Side by Side Diff: ash/mus/window_manager_application.h

Issue 2539363005: Converts ash to use aura-mus (Closed)
Patch Set: merge Created 4 years 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ 5 #ifndef ASH_MUS_WINDOW_MANAGER_APPLICATION_H_
6 #define ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ 6 #define ASH_MUS_WINDOW_MANAGER_APPLICATION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <set> 11 #include <set>
12 12
13 #include "ash/public/interfaces/wallpaper.mojom.h" 13 #include "ash/public/interfaces/wallpaper.mojom.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "mash/session/public/interfaces/session.mojom.h" 16 #include "mash/session/public/interfaces/session.mojom.h"
17 #include "mojo/public/cpp/bindings/binding.h" 17 #include "mojo/public/cpp/bindings/binding.h"
18 #include "services/service_manager/public/cpp/service.h" 18 #include "services/service_manager/public/cpp/service.h"
19 #include "services/tracing/public/cpp/provider.h" 19 #include "services/tracing/public/cpp/provider.h"
20 #include "services/ui/common/types.h" 20 #include "services/ui/common/types.h"
21 21
22 namespace aura {
23 class MusContextFactory;
24 class WindowTreeClient;
25 }
26
22 namespace base { 27 namespace base {
23 class SequencedWorkerPool; 28 class SequencedWorkerPool;
24 } 29 }
25 30
26 namespace chromeos { 31 namespace chromeos {
27 namespace system { 32 namespace system {
28 class ScopedFakeStatisticsProvider; 33 class ScopedFakeStatisticsProvider;
29 } 34 }
30 } 35 }
31 36
32 namespace views { 37 namespace views {
33 class AuraInit; 38 class AuraInit;
34 class SurfaceContextFactory;
35 } 39 }
36 40
37 namespace ui { 41 namespace ui {
38 class GpuService; 42 class GpuService;
39 class WindowTreeClient;
40 } 43 }
41 44
42 namespace ash { 45 namespace ash {
43 namespace mus { 46 namespace mus {
44 47
45 class NativeWidgetFactoryMus;
46 class NetworkConnectDelegateMus; 48 class NetworkConnectDelegateMus;
47 class WindowManager; 49 class WindowManager;
48 50
49 // Hosts the window manager and the ash system user interface for mash. 51 // Hosts the window manager and the ash system user interface for mash.
50 class WindowManagerApplication 52 class WindowManagerApplication
51 : public service_manager::Service, 53 : public service_manager::Service,
52 public mash::session::mojom::ScreenlockStateListener { 54 public mash::session::mojom::ScreenlockStateListener {
53 public: 55 public:
54 WindowManagerApplication(); 56 WindowManagerApplication();
55 ~WindowManagerApplication() override; 57 ~WindowManagerApplication() override;
56 58
57 WindowManager* window_manager() { return window_manager_.get(); } 59 WindowManager* window_manager() { return window_manager_.get(); }
58 60
59 mash::session::mojom::Session* session() { return session_.get(); } 61 mash::session::mojom::Session* session() { return session_.get(); }
60 62
61 private: 63 private:
62 friend class WmTestBase; 64 friend class WmTestBase;
63 friend class WmTestHelper; 65 friend class WmTestHelper;
64 66
65 void InitWindowManager( 67 void InitWindowManager(
66 std::unique_ptr<ui::WindowTreeClient> window_tree_client, 68 std::unique_ptr<aura::WindowTreeClient> window_tree_client,
67 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool); 69 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool);
68 70
69 // Initializes lower-level OS-specific components (e.g. D-Bus services). 71 // Initializes lower-level OS-specific components (e.g. D-Bus services).
70 void InitializeComponents(); 72 void InitializeComponents();
71 void ShutdownComponents(); 73 void ShutdownComponents();
72 74
73 // service_manager::Service: 75 // service_manager::Service:
74 void OnStart() override; 76 void OnStart() override;
75 bool OnConnect(const service_manager::ServiceInfo& remote_info, 77 bool OnConnect(const service_manager::ServiceInfo& remote_info,
76 service_manager::InterfaceRegistry* registry) override; 78 service_manager::InterfaceRegistry* registry) override;
77 79
78 // session::mojom::ScreenlockStateListener: 80 // session::mojom::ScreenlockStateListener:
79 void ScreenlockStateChanged(bool locked) override; 81 void ScreenlockStateChanged(bool locked) override;
80 82
81 tracing::Provider tracing_; 83 tracing::Provider tracing_;
82 84
83 std::unique_ptr<views::AuraInit> aura_init_; 85 std::unique_ptr<views::AuraInit> aura_init_;
84 std::unique_ptr<NativeWidgetFactoryMus> native_widget_factory_mus_;
85 86
86 std::unique_ptr<ui::GpuService> gpu_service_; 87 std::unique_ptr<ui::GpuService> gpu_service_;
87 std::unique_ptr<views::SurfaceContextFactory> compositor_context_factory_; 88 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_;
88 std::unique_ptr<WindowManager> window_manager_; 89 std::unique_ptr<WindowManager> window_manager_;
89 90
90 // A blocking pool used by the WindowManager's shell; not used in tests. 91 // A blocking pool used by the WindowManager's shell; not used in tests.
91 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; 92 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
92 93
93 mash::session::mojom::SessionPtr session_; 94 mash::session::mojom::SessionPtr session_;
94 95
95 mojo::Binding<mash::session::mojom::ScreenlockStateListener> 96 mojo::Binding<mash::session::mojom::ScreenlockStateListener>
96 screenlock_state_listener_binding_; 97 screenlock_state_listener_binding_;
97 98
98 #if defined(OS_CHROMEOS) 99 #if defined(OS_CHROMEOS)
99 std::unique_ptr<NetworkConnectDelegateMus> network_connect_delegate_; 100 std::unique_ptr<NetworkConnectDelegateMus> network_connect_delegate_;
100 std::unique_ptr<chromeos::system::ScopedFakeStatisticsProvider> 101 std::unique_ptr<chromeos::system::ScopedFakeStatisticsProvider>
101 statistics_provider_; 102 statistics_provider_;
102 #endif 103 #endif
103 104
104 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); 105 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication);
105 }; 106 };
106 107
107 } // namespace mus 108 } // namespace mus
108 } // namespace ash 109 } // namespace ash
109 110
110 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ 111 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698