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

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

Issue 1676713002: ash/mash: Add a mus-client that sets up ash to provide the system ui for mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ 5 #ifndef UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_
6 #define UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ 6 #define UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "components/mus/public/interfaces/window_tree.mojom.h" 16 #include "components/mus/public/interfaces/window_tree.mojom.h"
17 #include "ui/aura/window_delegate.h" 17 #include "ui/aura/window_delegate.h"
18 #include "ui/aura/window_tree_host_observer.h" 18 #include "ui/aura/window_tree_host_observer.h"
19 #include "ui/platform_window/platform_window_delegate.h" 19 #include "ui/platform_window/platform_window_delegate.h"
20 #include "ui/views/mus/mus_export.h" 20 #include "ui/views/mus/mus_export.h"
21 #include "ui/views/widget/native_widget_private.h" 21 #include "ui/views/widget/native_widget_private.h"
22 22
23 namespace aura { 23 namespace aura {
24 namespace client { 24 namespace client {
25 class DefaultCaptureClient; 25 class DefaultCaptureClient;
26 class ScreenPositionClient;
26 class WindowTreeClient; 27 class WindowTreeClient;
27 } 28 }
28 class Window; 29 class Window;
29 } 30 }
30 31
31 namespace mojo { 32 namespace mojo {
32 class Shell; 33 class Shell;
33 } 34 }
34 35
35 namespace mus { 36 namespace mus {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // creating a new Window for a Widget. 68 // creating a new Window for a Widget.
68 static void ConfigurePropertiesForNewWindow( 69 static void ConfigurePropertiesForNewWindow(
69 const Widget::InitParams& init_params, 70 const Widget::InitParams& init_params,
70 std::map<std::string, std::vector<uint8_t>>* properties); 71 std::map<std::string, std::vector<uint8_t>>* properties);
71 72
72 // Notifies all widgets the frame constants changed in some way. 73 // Notifies all widgets the frame constants changed in some way.
73 static void NotifyFrameChanged(mus::WindowTreeConnection* connection); 74 static void NotifyFrameChanged(mus::WindowTreeConnection* connection);
74 75
75 mus::Window* window() { return window_; } 76 mus::Window* window() { return window_; }
76 77
78 aura::Window* GetRootWindow();
79
77 void OnPlatformWindowClosed(); 80 void OnPlatformWindowClosed();
78 void OnActivationChanged(bool active); 81 void OnActivationChanged(bool active);
79 82
80 protected: 83 protected:
81 // Updates the client area in the mus::Window. 84 // Updates the client area in the mus::Window.
82 virtual void UpdateClientArea(); 85 virtual void UpdateClientArea();
83 86
84 // internal::NativeWidgetPrivate: 87 // internal::NativeWidgetPrivate:
85 NonClientFrameView* CreateNonClientFrameView() override; 88 NonClientFrameView* CreateNonClientFrameView() override;
86 void InitNativeWidget(const Widget::InitParams& params) override; 89 void InitNativeWidget(const Widget::InitParams& params) override;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void OnMouseEvent(ui::MouseEvent* event) override; 196 void OnMouseEvent(ui::MouseEvent* event) override;
194 void OnScrollEvent(ui::ScrollEvent* event) override; 197 void OnScrollEvent(ui::ScrollEvent* event) override;
195 void OnGestureEvent(ui::GestureEvent* event) override; 198 void OnGestureEvent(ui::GestureEvent* event) override;
196 199
197 // Overridden from aura::WindowTreeHostObserver: 200 // Overridden from aura::WindowTreeHostObserver:
198 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; 201 void OnHostCloseRequested(const aura::WindowTreeHost* host) override;
199 202
200 private: 203 private:
201 mus::Window* window_; 204 mus::Window* window_;
202 205
203 mojo::Shell* shell_;
204
205 internal::NativeWidgetDelegate* native_widget_delegate_; 206 internal::NativeWidgetDelegate* native_widget_delegate_;
206 207
207 const mus::mojom::SurfaceType surface_type_; 208 const mus::mojom::SurfaceType surface_type_;
208 ui::PlatformWindowState show_state_before_fullscreen_; 209 ui::PlatformWindowState show_state_before_fullscreen_;
209 210
210 // See class documentation for Widget in widget.h for a note about ownership. 211 // See class documentation for Widget in widget.h for a note about ownership.
211 Widget::InitParams::Ownership ownership_; 212 Widget::InitParams::Ownership ownership_;
212 213
213 // Aura configuration. 214 // Aura configuration.
214 scoped_ptr<SurfaceContextFactory> context_factory_; 215 scoped_ptr<SurfaceContextFactory> context_factory_;
215 scoped_ptr<WindowTreeHostMus> window_tree_host_; 216 scoped_ptr<WindowTreeHostMus> window_tree_host_;
216 aura::Window* content_; 217 aura::Window* content_;
217 scoped_ptr<wm::FocusController> focus_client_; 218 scoped_ptr<wm::FocusController> focus_client_;
218 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_; 219 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
219 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; 220 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_;
221 scoped_ptr<aura::client::ScreenPositionClient> screen_position_client_;
220 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; 222 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_;
221 223
222 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); 224 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus);
223 }; 225 };
224 226
225 } // namespace views 227 } // namespace views
226 228
227 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ 229 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698