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

Side by Side Diff: ash/wm/common/window_positioner.h

Issue 1926913002: Moves more code to ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor_workspace_layout_manager
Patch Set: merge to trunk Created 4 years, 7 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
« no previous file with comments | « ash/wm/common/always_on_top_controller.cc ('k') | ash/wm/common/window_positioner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_COMMON_WINDOW_POSITIONER_H_
6 #define ASH_WM_WINDOW_POSITIONER_H_ 6 #define ASH_WM_COMMON_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
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // function will return an empty rectangle. 96 // function will return an empty rectangle.
97 gfx::Rect SmartPopupPosition(const gfx::Rect& old_pos, 97 gfx::Rect SmartPopupPosition(const gfx::Rect& old_pos,
98 const gfx::Rect& work_area, 98 const gfx::Rect& work_area,
99 int grid); 99 int grid);
100 100
101 // Find the next available cascading popup position (on the given screen). 101 // Find the next available cascading popup position (on the given screen).
102 gfx::Rect NormalPopupPosition(const gfx::Rect& old_pos, 102 gfx::Rect NormalPopupPosition(const gfx::Rect& old_pos,
103 const gfx::Rect& work_area); 103 const gfx::Rect& work_area);
104 104
105 // Align the location to the grid / snap to the right / bottom corner. 105 // Align the location to the grid / snap to the right / bottom corner.
106 gfx::Rect AlignPopupPosition(const gfx::Rect &pos, 106 gfx::Rect AlignPopupPosition(const gfx::Rect& pos,
107 const gfx::Rect &work_area, 107 const gfx::Rect& work_area,
108 int grid); 108 int grid);
109 109
110 // Constant exposed for unittest. 110 // Constant exposed for unittest.
111 static const int kMinimumWindowOffset; 111 static const int kMinimumWindowOffset;
112 112
113 wm::WmGlobals* globals_; 113 wm::WmGlobals* globals_;
114 114
115 // The offset in X and Y for the next popup which opens. 115 // The offset in X and Y for the next popup which opens.
116 int pop_position_offset_increment_x; 116 int pop_position_offset_increment_x;
117 int pop_position_offset_increment_y; 117 int pop_position_offset_increment_y;
118 118
119 // The position on the screen for the first popup which gets shown if no 119 // The position on the screen for the first popup which gets shown if no
120 // empty space can be found. 120 // empty space can be found.
121 int popup_position_offset_from_screen_corner_x; 121 int popup_position_offset_from_screen_corner_x;
122 int popup_position_offset_from_screen_corner_y; 122 int popup_position_offset_from_screen_corner_y;
123 123
124 // The last used position. 124 // The last used position.
125 int last_popup_position_x_; 125 int last_popup_position_x_;
126 int last_popup_position_y_; 126 int last_popup_position_y_;
127 127
128 DISALLOW_COPY_AND_ASSIGN(WindowPositioner); 128 DISALLOW_COPY_AND_ASSIGN(WindowPositioner);
129 }; 129 };
130 130
131 } // namespace ash 131 } // namespace ash
132 132
133 #endif // ASH_WM_WINDOW_POSITIONER_H_ 133 #endif // ASH_WM_COMMON_WINDOW_POSITIONER_H_
OLDNEW
« no previous file with comments | « ash/wm/common/always_on_top_controller.cc ('k') | ash/wm/common/window_positioner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698