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

Side by Side Diff: ash/wm/workspace/workspace_manager.h

Issue 9969164: Ignoring alignment when it pushes a window out of the screen (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Not my code anymore Created 8 years, 8 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/workspace/workspace_layout_manager.cc ('k') | ash/wm/workspace/workspace_manager.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WORKSPACE_MANAGER_H_ 5 #ifndef ASH_WM_WORKSPACE_MANAGER_H_
6 #define ASH_WM_WORKSPACE_MANAGER_H_ 6 #define ASH_WM_WORKSPACE_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // Returns the window the layout manager should allow the size to be set for. 79 // Returns the window the layout manager should allow the size to be set for.
80 // TODO: maybe this should be set on WorkspaceLayoutManager. 80 // TODO: maybe this should be set on WorkspaceLayoutManager.
81 aura::Window* ignored_window() { return ignored_window_; } 81 aura::Window* ignored_window() { return ignored_window_; }
82 82
83 // Sets the size of the grid. Newly added windows are forced to align to the 83 // Sets the size of the grid. Newly added windows are forced to align to the
84 // size of the grid. 84 // size of the grid.
85 void set_grid_size(int size) { grid_size_ = size; } 85 void set_grid_size(int size) { grid_size_ = size; }
86 int grid_size() const { return grid_size_; } 86 int grid_size() const { return grid_size_; }
87 87
88 // Returns a bounds aligned to the grid. Returns |bounds| if grid_size is 0.
89 gfx::Rect AlignBoundsToGrid(const gfx::Rect& bounds);
90
91 void set_shelf(ShelfLayoutManager* shelf) { shelf_ = shelf; } 88 void set_shelf(ShelfLayoutManager* shelf) { shelf_ = shelf; }
92 89
93 // Updates the visibility and whether any windows overlap the shelf. 90 // Updates the visibility and whether any windows overlap the shelf.
94 void UpdateShelfVisibility(); 91 void UpdateShelfVisibility();
95 92
96 // Returns the current window state. 93 // Returns the current window state.
97 WindowState GetWindowState(); 94 WindowState GetWindowState();
98 95
99 // Invoked when the show state of the specified window changes. 96 // Invoked when the show state of the specified window changes.
100 void ShowStateChanged(aura::Window* window); 97 void ShowStateChanged(aura::Window* window);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Owned by the Shell container window LauncherContainer. May be NULL. 171 // Owned by the Shell container window LauncherContainer. May be NULL.
175 ShelfLayoutManager* shelf_; 172 ShelfLayoutManager* shelf_;
176 173
177 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager); 174 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager);
178 }; 175 };
179 176
180 } // namespace internal 177 } // namespace internal
181 } // namespace ash 178 } // namespace ash
182 179
183 #endif // ASH_WM_WORKSPACE_MANAGER_H_ 180 #endif // ASH_WM_WORKSPACE_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager.cc ('k') | ash/wm/workspace/workspace_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698