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

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

Issue 2655513002: mash: Relay some Chrome aura window properties to Ash. (Closed)
Patch Set: Address comments. Created 3 years, 10 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 | « ui/views/mus/desktop_window_tree_host_mus.cc ('k') | ui/views/mus/mus_client.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 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 27 matching lines...) Expand all
38 class Identity; 38 class Identity;
39 } 39 }
40 40
41 namespace wm { 41 namespace wm {
42 class WMState; 42 class WMState;
43 } 43 }
44 44
45 namespace views { 45 namespace views {
46 46
47 class MusClientObserver; 47 class MusClientObserver;
48 class MusPropertyMirror;
48 class PointerWatcherEventRouter; 49 class PointerWatcherEventRouter;
49 class ScreenMus; 50 class ScreenMus;
50 51
51 namespace internal { 52 namespace internal {
52 class NativeWidgetDelegate; 53 class NativeWidgetDelegate;
53 } 54 }
54 55
55 namespace test { 56 namespace test {
56 class MusClientTestApi; 57 class MusClientTestApi;
57 } 58 }
58 59
59 // MusClient establishes a connection to mus and sets up necessary state so that 60 // MusClient establishes a connection to mus and sets up necessary state so that
60 // aura and views target mus. This class is useful for typical clients, not the 61 // aura and views target mus. This class is useful for typical clients, not the
61 // WindowManager. Most clients don't create this directly, rather use 62 // WindowManager. Most clients don't create this directly, rather use AuraInit.
62 // AuraInit.
63 class VIEWS_MUS_EXPORT MusClient 63 class VIEWS_MUS_EXPORT MusClient
64 : public aura::WindowTreeClientDelegate, 64 : public aura::WindowTreeClientDelegate,
65 public ScreenMusDelegate, 65 public ScreenMusDelegate,
66 public ui::OSExchangeDataProviderFactory::Factory { 66 public ui::OSExchangeDataProviderFactory::Factory {
67 public: 67 public:
68 // Most clients should use AuraInit, which creates a MusClient. 68 // Most clients should use AuraInit, which creates a MusClient.
69 // |create_wm_state| indicates whether MusClient should create a wm::WMState. 69 // |create_wm_state| indicates whether MusClient should create a wm::WMState.
70 MusClient( 70 MusClient(
71 service_manager::Connector* connector, 71 service_manager::Connector* connector,
72 const service_manager::Identity& identity, 72 const service_manager::Identity& identity,
(...skipping 24 matching lines...) Expand all
97 97
98 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is 98 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is
99 // set as the factory function used for creating NativeWidgets when a 99 // set as the factory function used for creating NativeWidgets when a
100 // NativeWidget has not been explicitly set. 100 // NativeWidget has not been explicitly set.
101 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, 101 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params,
102 internal::NativeWidgetDelegate* delegate); 102 internal::NativeWidgetDelegate* delegate);
103 103
104 void AddObserver(MusClientObserver* observer); 104 void AddObserver(MusClientObserver* observer);
105 void RemoveObserver(MusClientObserver* observer); 105 void RemoveObserver(MusClientObserver* observer);
106 106
107 void SetMusPropertyMirror(std::unique_ptr<MusPropertyMirror> mirror);
108 MusPropertyMirror* mus_property_mirror() {
109 return mus_property_mirror_.get();
110 }
111
107 private: 112 private:
108 friend class AuraInit; 113 friend class AuraInit;
109 friend class test::MusClientTestApi; 114 friend class test::MusClientTestApi;
110 115
111 // aura::WindowTreeClientDelegate: 116 // aura::WindowTreeClientDelegate:
112 void OnEmbed( 117 void OnEmbed(
113 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override; 118 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override;
114 void OnLostConnection(aura::WindowTreeClient* client) override; 119 void OnLostConnection(aura::WindowTreeClient* client) override;
115 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override; 120 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override;
116 void OnPointerEventObserved(const ui::PointerEvent& event, 121 void OnPointerEventObserved(const ui::PointerEvent& event,
(...skipping 16 matching lines...) Expand all
133 138
134 base::ObserverList<MusClientObserver> observer_list_; 139 base::ObserverList<MusClientObserver> observer_list_;
135 140
136 // NOTE: this may be null (creation is based on argument supplied to 141 // NOTE: this may be null (creation is based on argument supplied to
137 // constructor). 142 // constructor).
138 std::unique_ptr<wm::WMState> wm_state_; 143 std::unique_ptr<wm::WMState> wm_state_;
139 144
140 std::unique_ptr<ScreenMus> screen_; 145 std::unique_ptr<ScreenMus> screen_;
141 146
142 std::unique_ptr<aura::PropertyConverter> property_converter_; 147 std::unique_ptr<aura::PropertyConverter> property_converter_;
148 std::unique_ptr<MusPropertyMirror> mus_property_mirror_;
143 149
144 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; 150 std::unique_ptr<aura::WindowTreeClient> window_tree_client_;
145 151
146 std::unique_ptr<PointerWatcherEventRouter> pointer_watcher_event_router_; 152 std::unique_ptr<PointerWatcherEventRouter> pointer_watcher_event_router_;
147 153
148 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> 154 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager>
149 discardable_shared_memory_manager_; 155 discardable_shared_memory_manager_;
150 156
151 DISALLOW_COPY_AND_ASSIGN(MusClient); 157 DISALLOW_COPY_AND_ASSIGN(MusClient);
152 }; 158 };
153 159
154 } // namespace views 160 } // namespace views
155 161
156 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ 162 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/views/mus/desktop_window_tree_host_mus.cc ('k') | ui/views/mus/mus_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698