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

Side by Side Diff: ui/views/mus/mus_client.h

Issue 2633233003: aura-mus: Implement stacking in DesktopWindowTreeHostMus. (Closed)
Patch Set: Add access policy for CanStackAtTop. Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 UI_VIEWS_MUS_MUS_CLIENT_H_ 5 #ifndef UI_VIEWS_MUS_MUS_CLIENT_H_
6 #define UI_VIEWS_MUS_MUS_CLIENT_H_ 6 #define UI_VIEWS_MUS_MUS_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 class MusClientObserver; 52 class MusClientObserver;
53 class PointerWatcherEventRouter; 53 class PointerWatcherEventRouter;
54 class ScreenMus; 54 class ScreenMus;
55 55
56 namespace internal { 56 namespace internal {
57 class NativeWidgetDelegate; 57 class NativeWidgetDelegate;
58 } 58 }
59 59
60 namespace test { 60 namespace test {
61 class MusClientTestApi; 61 class MusClientTestApi;
62 class MusClientTestObserver;
62 } 63 }
63 64
64 // MusClient establishes a connection to mus and sets up necessary state so that 65 // MusClient establishes a connection to mus and sets up necessary state so that
65 // aura and views target mus. This class is useful for typical clients, not the 66 // aura and views target mus. This class is useful for typical clients, not the
66 // WindowManager. Most clients don't create this directly, rather use 67 // WindowManager. Most clients don't create this directly, rather use
67 // AuraInit. 68 // AuraInit.
68 class VIEWS_MUS_EXPORT MusClient 69 class VIEWS_MUS_EXPORT MusClient
69 : public aura::WindowTreeClientDelegate, 70 : public aura::WindowTreeClientDelegate,
70 public ScreenMusDelegate, 71 public ScreenMusDelegate,
71 public ui::OSExchangeDataProviderFactory::Factory { 72 public ui::OSExchangeDataProviderFactory::Factory {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 friend class AuraInit; 116 friend class AuraInit;
116 friend class test::MusClientTestApi; 117 friend class test::MusClientTestApi;
117 118
118 // aura::WindowTreeClientDelegate: 119 // aura::WindowTreeClientDelegate:
119 void OnEmbed( 120 void OnEmbed(
120 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override; 121 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override;
121 void OnLostConnection(aura::WindowTreeClient* client) override; 122 void OnLostConnection(aura::WindowTreeClient* client) override;
122 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override; 123 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override;
123 void OnPointerEventObserved(const ui::PointerEvent& event, 124 void OnPointerEventObserved(const ui::PointerEvent& event,
124 aura::Window* target) override; 125 aura::Window* target) override;
126 void OnChangeCompleted(aura::ChangeType type, bool success) override;
125 aura::client::CaptureClient* GetCaptureClient() override; 127 aura::client::CaptureClient* GetCaptureClient() override;
126 aura::PropertyConverter* GetPropertyConverter() override; 128 aura::PropertyConverter* GetPropertyConverter() override;
127 129
128 // ScreenMusDelegate: 130 // ScreenMusDelegate:
129 void OnWindowManagerFrameValuesChanged() override; 131 void OnWindowManagerFrameValuesChanged() override;
130 aura::Window* GetWindowAtScreenPoint(const gfx::Point& point) override; 132 aura::Window* GetWindowAtScreenPoint(const gfx::Point& point) override;
131 133
132 // ui:OSExchangeDataProviderFactory::Factory: 134 // ui:OSExchangeDataProviderFactory::Factory:
133 std::unique_ptr<OSExchangeData::Provider> BuildProvider() override; 135 std::unique_ptr<OSExchangeData::Provider> BuildProvider() override;
134 136
135 static MusClient* instance_; 137 static MusClient* instance_;
136 138
137 service_manager::Identity identity_; 139 service_manager::Identity identity_;
138 140
139 std::unique_ptr<base::Thread> io_thread_; 141 std::unique_ptr<base::Thread> io_thread_;
140 142
141 base::ObserverList<MusClientObserver> observer_list_; 143 base::ObserverList<MusClientObserver> observer_list_;
142 144
145 // An observer that's only set during tests to listen for internal events.
146 test::MusClientTestObserver* test_observer_;
147
143 // NOTE: this may be null (creation is based on argument supplied to 148 // NOTE: this may be null (creation is based on argument supplied to
144 // constructor). 149 // constructor).
145 std::unique_ptr<wm::WMState> wm_state_; 150 std::unique_ptr<wm::WMState> wm_state_;
146 151
147 std::unique_ptr<ScreenMus> screen_; 152 std::unique_ptr<ScreenMus> screen_;
148 153
149 std::unique_ptr<aura::PropertyConverter> property_converter_; 154 std::unique_ptr<aura::PropertyConverter> property_converter_;
150 155
151 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; 156 std::unique_ptr<aura::WindowTreeClient> window_tree_client_;
152 157
153 std::unique_ptr<ui::Gpu> gpu_; 158 std::unique_ptr<ui::Gpu> gpu_;
154 159
155 std::unique_ptr<PointerWatcherEventRouter> pointer_watcher_event_router_; 160 std::unique_ptr<PointerWatcherEventRouter> pointer_watcher_event_router_;
156 161
157 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_; 162 std::unique_ptr<aura::MusContextFactory> compositor_context_factory_;
158 163
159 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> 164 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager>
160 discardable_shared_memory_manager_; 165 discardable_shared_memory_manager_;
161 166
162 DISALLOW_COPY_AND_ASSIGN(MusClient); 167 DISALLOW_COPY_AND_ASSIGN(MusClient);
163 }; 168 };
164 169
165 } // namespace views 170 } // namespace views
166 171
167 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ 172 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698