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

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

Issue 2655513002: mash: Relay some Chrome aura window properties to Ash. (Closed)
Patch Set: More cleanup. 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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 namespace internal { 51 namespace internal {
52 class NativeWidgetDelegate; 52 class NativeWidgetDelegate;
53 } 53 }
54 54
55 namespace test { 55 namespace test {
56 class MusClientTestApi; 56 class MusClientTestApi;
57 } 57 }
58 58
59 // MusClient establishes a connection to mus and sets up necessary state so that 59 // 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 60 // 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 61 // WindowManager. Most clients don't create this directly, rather use AuraInit.
62 // AuraInit.
63 class VIEWS_MUS_EXPORT MusClient 62 class VIEWS_MUS_EXPORT MusClient
64 : public aura::WindowTreeClientDelegate, 63 : public aura::WindowTreeClientDelegate,
65 public ScreenMusDelegate, 64 public ScreenMusDelegate,
66 public ui::OSExchangeDataProviderFactory::Factory { 65 public ui::OSExchangeDataProviderFactory::Factory {
67 public: 66 public:
68 // Most clients should use AuraInit, which creates a MusClient. 67 // Most clients should use AuraInit, which creates a MusClient.
69 // |create_wm_state| indicates whether MusClient should create a wm::WMState. 68 // |create_wm_state| indicates whether MusClient should create a wm::WMState.
70 MusClient( 69 MusClient(
71 service_manager::Connector* connector, 70 service_manager::Connector* connector,
72 const service_manager::Identity& identity, 71 const service_manager::Identity& identity,
(...skipping 24 matching lines...) Expand all
97 96
98 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is 97 // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is
99 // set as the factory function used for creating NativeWidgets when a 98 // set as the factory function used for creating NativeWidgets when a
100 // NativeWidget has not been explicitly set. 99 // NativeWidget has not been explicitly set.
101 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, 100 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params,
102 internal::NativeWidgetDelegate* delegate); 101 internal::NativeWidgetDelegate* delegate);
103 102
104 void AddObserver(MusClientObserver* observer); 103 void AddObserver(MusClientObserver* observer);
105 void RemoveObserver(MusClientObserver* observer); 104 void RemoveObserver(MusClientObserver* observer);
106 105
106 // Called when a client window property changes; notifies observers.
107 void OnWindowPropertyChanged(aura::Window* window, const void* key);
108
107 private: 109 private:
108 friend class AuraInit; 110 friend class AuraInit;
109 friend class test::MusClientTestApi; 111 friend class test::MusClientTestApi;
110 112
111 // aura::WindowTreeClientDelegate: 113 // aura::WindowTreeClientDelegate:
112 void OnEmbed( 114 void OnEmbed(
113 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override; 115 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override;
114 void OnLostConnection(aura::WindowTreeClient* client) override; 116 void OnLostConnection(aura::WindowTreeClient* client) override;
115 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override; 117 void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override;
116 void OnPointerEventObserved(const ui::PointerEvent& event, 118 void OnPointerEventObserved(const ui::PointerEvent& event,
(...skipping 30 matching lines...) Expand all
147 149
148 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> 150 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager>
149 discardable_shared_memory_manager_; 151 discardable_shared_memory_manager_;
150 152
151 DISALLOW_COPY_AND_ASSIGN(MusClient); 153 DISALLOW_COPY_AND_ASSIGN(MusClient);
152 }; 154 };
153 155
154 } // namespace views 156 } // namespace views
155 157
156 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_ 158 #endif // UI_VIEWS_MUS_MUS_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698