| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_WINDOW_POSITIONER_H_ | 5 #ifndef ASH_WM_WINDOW_POSITIONER_H_ |
| 6 #define ASH_WM_WINDOW_POSITIONER_H_ | 6 #define ASH_WM_WINDOW_POSITIONER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/base/ui_base_types.h" | 10 #include "ui/base/ui_base_types.h" |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 class Display; | 13 class Display; |
| 14 class Rect; | 14 class Rect; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace display { |
| 18 using Display = gfx::Display; |
| 19 } |
| 20 |
| 17 namespace ash { | 21 namespace ash { |
| 18 namespace wm { | 22 namespace wm { |
| 19 class WmGlobals; | 23 class WmGlobals; |
| 20 class WmWindow; | 24 class WmWindow; |
| 21 } | 25 } |
| 22 | 26 |
| 23 namespace test { | 27 namespace test { |
| 24 class WindowPositionerTest; | 28 class WindowPositionerTest; |
| 25 } | 29 } |
| 26 | 30 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 47 // |is_saved_bounds| indicates the |bounds_in_out| is the saved | 51 // |is_saved_bounds| indicates the |bounds_in_out| is the saved |
| 48 // bounds. | 52 // bounds. |
| 49 static void GetBoundsAndShowStateForNewWindow( | 53 static void GetBoundsAndShowStateForNewWindow( |
| 50 const wm::WmWindow* new_window, | 54 const wm::WmWindow* new_window, |
| 51 bool is_saved_bounds, | 55 bool is_saved_bounds, |
| 52 ui::WindowShowState show_state_in, | 56 ui::WindowShowState show_state_in, |
| 53 gfx::Rect* bounds_in_out, | 57 gfx::Rect* bounds_in_out, |
| 54 ui::WindowShowState* show_state_out); | 58 ui::WindowShowState* show_state_out); |
| 55 | 59 |
| 56 // Returns the default bounds for a window to be created in the |display|. | 60 // Returns the default bounds for a window to be created in the |display|. |
| 57 static gfx::Rect GetDefaultWindowBounds(const gfx::Display& display); | 61 static gfx::Rect GetDefaultWindowBounds(const display::Display& display); |
| 58 | 62 |
| 59 // Check if after removal or hide of the given |removed_window| an | 63 // Check if after removal or hide of the given |removed_window| an |
| 60 // automated desktop location management can be performed and | 64 // automated desktop location management can be performed and |
| 61 // rearrange accordingly. | 65 // rearrange accordingly. |
| 62 static void RearrangeVisibleWindowOnHideOrRemove( | 66 static void RearrangeVisibleWindowOnHideOrRemove( |
| 63 const wm::WmWindow* removed_window); | 67 const wm::WmWindow* removed_window); |
| 64 | 68 |
| 65 // Turn the automatic positioning logic temporarily off. Returns the previous | 69 // Turn the automatic positioning logic temporarily off. Returns the previous |
| 66 // state. | 70 // state. |
| 67 static bool DisableAutoPositioning(bool ignore); | 71 static bool DisableAutoPositioning(bool ignore); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // The last used position. | 124 // The last used position. |
| 121 int last_popup_position_x_; | 125 int last_popup_position_x_; |
| 122 int last_popup_position_y_; | 126 int last_popup_position_y_; |
| 123 | 127 |
| 124 DISALLOW_COPY_AND_ASSIGN(WindowPositioner); | 128 DISALLOW_COPY_AND_ASSIGN(WindowPositioner); |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 } // namespace ash | 131 } // namespace ash |
| 128 | 132 |
| 129 #endif // ASH_WM_WINDOW_POSITIONER_H_ | 133 #endif // ASH_WM_WINDOW_POSITIONER_H_ |
| OLD | NEW |