| OLD | NEW |
| 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> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 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 ScreenPositionClient; |
| 27 class WindowTreeClient; | 27 class WindowTreeClient; |
| 28 } | 28 } |
| 29 class Window; | 29 class Window; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace mojo { | |
| 33 class Connector; | |
| 34 } | |
| 35 | |
| 36 namespace mus { | 32 namespace mus { |
| 37 class Window; | 33 class Window; |
| 38 class WindowTreeConnection; | 34 class WindowTreeConnection; |
| 39 } | 35 } |
| 40 | 36 |
| 37 namespace shell { |
| 38 class Connector; |
| 39 } |
| 40 |
| 41 namespace wm { | 41 namespace wm { |
| 42 class FocusController; | 42 class FocusController; |
| 43 } | 43 } |
| 44 | 44 |
| 45 namespace views { | 45 namespace views { |
| 46 class SurfaceContextFactory; | 46 class SurfaceContextFactory; |
| 47 class WidgetDelegate; | 47 class WidgetDelegate; |
| 48 class WindowTreeHostMus; | 48 class WindowTreeHostMus; |
| 49 | 49 |
| 50 // An implementation of NativeWidget that binds to a mus::Window. Because Aura | 50 // An implementation of NativeWidget that binds to a mus::Window. Because Aura |
| 51 // is used extensively within Views code, this code uses aura and binds to the | 51 // is used extensively within Views code, this code uses aura and binds to the |
| 52 // mus::Window via a Mus-specific aura::WindowTreeHost impl. Because the root | 52 // mus::Window via a Mus-specific aura::WindowTreeHost impl. Because the root |
| 53 // aura::Window in a hierarchy is created without a delegate by the | 53 // aura::Window in a hierarchy is created without a delegate by the |
| 54 // aura::WindowTreeHost, we must create a child aura::Window in this class | 54 // aura::WindowTreeHost, we must create a child aura::Window in this class |
| 55 // (content_) and attach it to the root. | 55 // (content_) and attach it to the root. |
| 56 class VIEWS_MUS_EXPORT NativeWidgetMus : public internal::NativeWidgetPrivate, | 56 class VIEWS_MUS_EXPORT NativeWidgetMus : public internal::NativeWidgetPrivate, |
| 57 public aura::WindowDelegate, | 57 public aura::WindowDelegate, |
| 58 public aura::WindowTreeHostObserver { | 58 public aura::WindowTreeHostObserver { |
| 59 public: | 59 public: |
| 60 NativeWidgetMus(internal::NativeWidgetDelegate* delegate, | 60 NativeWidgetMus(internal::NativeWidgetDelegate* delegate, |
| 61 mojo::Connector* connector, | 61 shell::Connector* connector, |
| 62 mus::Window* window, | 62 mus::Window* window, |
| 63 mus::mojom::SurfaceType surface_type); | 63 mus::mojom::SurfaceType surface_type); |
| 64 ~NativeWidgetMus() override; | 64 ~NativeWidgetMus() override; |
| 65 | 65 |
| 66 // Configures the set of properties supplied to the window manager when | 66 // Configures the set of properties supplied to the window manager when |
| 67 // creating a new Window for a Widget. | 67 // creating a new Window for a Widget. |
| 68 static void ConfigurePropertiesForNewWindow( | 68 static void ConfigurePropertiesForNewWindow( |
| 69 const Widget::InitParams& init_params, | 69 const Widget::InitParams& init_params, |
| 70 std::map<std::string, std::vector<uint8_t>>* properties); | 70 std::map<std::string, std::vector<uint8_t>>* properties); |
| 71 | 71 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_; | 227 std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_; |
| 228 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; | 228 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; |
| 229 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; | 229 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; |
| 230 | 230 |
| 231 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); | 231 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 } // namespace views | 234 } // namespace views |
| 235 | 235 |
| 236 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 236 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
| OLD | NEW |