| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_COMMON_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ |
| 6 #define ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_COMMON_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "ash/wm/common/dock/dock_types.h" |
| 12 #include "ash/wm/common/dock/docked_window_layout_manager_observer.h" |
| 13 #include "ash/wm/common/window_state_observer.h" |
| 11 #include "ash/wm/common/wm_activation_observer.h" | 14 #include "ash/wm/common/wm_activation_observer.h" |
| 12 #include "ash/wm/common/wm_root_window_controller_observer.h" | 15 #include "ash/wm/common/wm_root_window_controller_observer.h" |
| 13 #include "ash/wm/common/wm_snap_to_pixel_layout_manager.h" | 16 #include "ash/wm/common/wm_snap_to_pixel_layout_manager.h" |
| 14 #include "ash/wm/common/wm_window_observer.h" | 17 #include "ash/wm/common/wm_window_observer.h" |
| 15 #include "ash/wm/dock/dock_types.h" | |
| 16 #include "ash/wm/dock/docked_window_layout_manager_observer.h" | |
| 17 #include "ash/wm/window_state_observer.h" | |
| 18 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
| 21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 22 #include "ui/gfx/geometry/rect.h" | 22 #include "ui/gfx/geometry/rect.h" |
| 23 #include "ui/keyboard/keyboard_controller_observer.h" | 23 #include "ui/keyboard/keyboard_controller_observer.h" |
| 24 | 24 |
| 25 namespace ash { | 25 namespace ash { |
| 26 class DockedBackgroundWidget; | 26 class DockedBackgroundWidget; |
| 27 class DockedWindowLayoutManagerObserver; | 27 class DockedWindowLayoutManagerObserver; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Returns true when a window can be docked. Windows cannot be docked at the | 113 // Returns true when a window can be docked. Windows cannot be docked at the |
| 114 // edge used by the shelf or the edge opposite from existing dock. | 114 // edge used by the shelf or the edge opposite from existing dock. |
| 115 bool CanDockWindow(wm::WmWindow* window, DockedAlignment desired_alignment); | 115 bool CanDockWindow(wm::WmWindow* window, DockedAlignment desired_alignment); |
| 116 | 116 |
| 117 wm::WmWindow* dock_container() const { return dock_container_; } | 117 wm::WmWindow* dock_container() const { return dock_container_; } |
| 118 | 118 |
| 119 // Returns current bounding rectangle of docked windows area. | 119 // Returns current bounding rectangle of docked windows area. |
| 120 const gfx::Rect& docked_bounds() const { return docked_bounds_; } | 120 const gfx::Rect& docked_bounds() const { return docked_bounds_; } |
| 121 | 121 |
| 122 // Returns last known coordinates of |dragged_window_| after Relayout. | 122 // Returns last known coordinates of |dragged_window_| after Relayout. |
| 123 const gfx::Rect dragged_bounds() const { return dragged_bounds_;} | 123 const gfx::Rect dragged_bounds() const { return dragged_bounds_; } |
| 124 | 124 |
| 125 // Returns true if currently dragged window is docked at the screen edge. | 125 // Returns true if currently dragged window is docked at the screen edge. |
| 126 bool is_dragged_window_docked() const { return is_dragged_window_docked_; } | 126 bool is_dragged_window_docked() const { return is_dragged_window_docked_; } |
| 127 | 127 |
| 128 // Updates docked layout when shelf bounds change. | 128 // Updates docked layout when shelf bounds change. |
| 129 void OnShelfBoundsChanged(); | 129 void OnShelfBoundsChanged(); |
| 130 | 130 |
| 131 // SnapLayoutManager: | 131 // SnapLayoutManager: |
| 132 void OnWindowResized() override; | 132 void OnWindowResized() override; |
| 133 void OnWindowAddedToLayout(wm::WmWindow* child) override; | 133 void OnWindowAddedToLayout(wm::WmWindow* child) override; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 std::unique_ptr<DockedBackgroundWidget> background_widget_; | 305 std::unique_ptr<DockedBackgroundWidget> background_widget_; |
| 306 | 306 |
| 307 // Observers of dock bounds changes. | 307 // Observers of dock bounds changes. |
| 308 base::ObserverList<DockedWindowLayoutManagerObserver> observer_list_; | 308 base::ObserverList<DockedWindowLayoutManagerObserver> observer_list_; |
| 309 | 309 |
| 310 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); | 310 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); |
| 311 }; | 311 }; |
| 312 | 312 |
| 313 } // namespace ash | 313 } // namespace ash |
| 314 | 314 |
| 315 #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ | 315 #endif // ASH_WM_COMMON_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ |
| OLD | NEW |