| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 namespace ui { | 47 namespace ui { |
| 48 class Event; | 48 class Event; |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace wm { | 51 namespace wm { |
| 52 class CursorManager; | 52 class CursorManager; |
| 53 class FocusController; | 53 class FocusController; |
| 54 } | 54 } |
| 55 | 55 |
| 56 namespace views { | 56 namespace views { |
| 57 namespace corewm { |
| 58 class TooltipController; |
| 59 } |
| 57 class DropHelper; | 60 class DropHelper; |
| 58 class DropTargetMus; | 61 class DropTargetMus; |
| 62 class TooltipManagerAura; |
| 59 class WidgetDelegate; | 63 class WidgetDelegate; |
| 60 | 64 |
| 61 // An implementation of NativeWidget that binds to a ui::Window. Because Aura | 65 // An implementation of NativeWidget that binds to a ui::Window. Because Aura |
| 62 // is used extensively within Views code, this code uses aura and binds to the | 66 // is used extensively within Views code, this code uses aura and binds to the |
| 63 // ui::Window via a Mus-specific aura::WindowTreeHost impl. Because the root | 67 // ui::Window via a Mus-specific aura::WindowTreeHost impl. Because the root |
| 64 // aura::Window in a hierarchy is created without a delegate by the | 68 // aura::Window in a hierarchy is created without a delegate by the |
| 65 // aura::WindowTreeHost, we must create a child aura::Window in this class | 69 // aura::WindowTreeHost, we must create a child aura::Window in this class |
| 66 // (content_) and attach it to the root. | 70 // (content_) and attach it to the root. |
| 67 class VIEWS_MUS_EXPORT NativeWidgetMus | 71 class VIEWS_MUS_EXPORT NativeWidgetMus |
| 68 : public internal::NativeWidgetPrivate, | 72 : public internal::NativeWidgetPrivate, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 const ui::mojom::SurfaceType surface_type_; | 276 const ui::mojom::SurfaceType surface_type_; |
| 273 ui::mojom::ShowState show_state_before_fullscreen_; | 277 ui::mojom::ShowState show_state_before_fullscreen_; |
| 274 | 278 |
| 275 // See class documentation for Widget in widget.h for a note about ownership. | 279 // See class documentation for Widget in widget.h for a note about ownership. |
| 276 Widget::InitParams::Ownership ownership_; | 280 Widget::InitParams::Ownership ownership_; |
| 277 | 281 |
| 278 // Functions with the same name require the ui::WindowObserver to be in | 282 // Functions with the same name require the ui::WindowObserver to be in |
| 279 // a separate class. | 283 // a separate class. |
| 280 std::unique_ptr<MusWindowObserver> mus_window_observer_; | 284 std::unique_ptr<MusWindowObserver> mus_window_observer_; |
| 281 | 285 |
| 282 // This is misnamed; The native widget interface offers something called | |
| 283 // "native window properties" which are properties which it stores locally, | |
| 284 // and this is used to unsafely pass void* pointers around chrome. | |
| 285 std::map<std::string, void*> native_window_properties_; | |
| 286 | |
| 287 // Receives drop events for |window_|. | 286 // Receives drop events for |window_|. |
| 288 std::unique_ptr<DropTargetMus> drop_target_; | 287 std::unique_ptr<DropTargetMus> drop_target_; |
| 289 | 288 |
| 290 // Aura configuration. | 289 // Aura configuration. |
| 291 std::unique_ptr<WindowTreeHostMus> window_tree_host_; | 290 std::unique_ptr<WindowTreeHostMus> window_tree_host_; |
| 292 aura::Window* content_; | 291 aura::Window* content_; |
| 293 std::unique_ptr<wm::FocusController> focus_client_; | 292 std::unique_ptr<wm::FocusController> focus_client_; |
| 294 std::unique_ptr<MusCaptureClient> capture_client_; | 293 std::unique_ptr<MusCaptureClient> capture_client_; |
| 295 std::unique_ptr<aura::client::DragDropClient> drag_drop_client_; | 294 std::unique_ptr<aura::client::DragDropClient> drag_drop_client_; |
| 296 std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_; | 295 std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_; |
| 297 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; | 296 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; |
| 298 std::unique_ptr<wm::CursorManager> cursor_manager_; | 297 std::unique_ptr<wm::CursorManager> cursor_manager_; |
| 299 | 298 |
| 300 std::unique_ptr<DropHelper> drop_helper_; | 299 std::unique_ptr<DropHelper> drop_helper_; |
| 301 int last_drop_operation_; | 300 int last_drop_operation_; |
| 302 | 301 |
| 302 std::unique_ptr<corewm::TooltipController> tooltip_controller_; |
| 303 std::unique_ptr<TooltipManagerAura> tooltip_manager_; |
| 304 |
| 303 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; | 305 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; |
| 304 | 306 |
| 305 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); | 307 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); |
| 306 }; | 308 }; |
| 307 | 309 |
| 308 } // namespace views | 310 } // namespace views |
| 309 | 311 |
| 310 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 312 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
| OLD | NEW |