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

Unified Diff: ash/wm/shelf_layout_manager.cc

Issue 10979090: Simplify WorkAreaBounds access logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/shelf_layout_manager.h ('k') | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/shelf_layout_manager.cc
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index 0ec4a13db4b56976081297a1fd76fb0926279815..31eb4ba67f435a93c0eda70b31d71170f2cf44e7 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -495,32 +495,6 @@ void ShelfLayoutManager::OnWindowActivated(aura::Window* active,
ShelfLayoutManager::TargetBounds::TargetBounds() : opacity(0.0f) {}
-gfx::Rect ShelfLayoutManager::GetMaximizedWindowBounds(
- aura::Window* window) {
- gfx::Rect bounds(ScreenAsh::GetDisplayBoundsInParent(window));
- if (auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) {
- AdjustBoundsBasedOnAlignment(kAutoHideSize, &bounds);
- return bounds;
- }
- // SHELF_AUTO_HIDE_BEHAVIOR_NEVER maximized windows don't get any taller.
- return GetUnmaximizedWorkAreaBounds(window);
-}
-
-gfx::Rect ShelfLayoutManager::GetUnmaximizedWorkAreaBounds(
- aura::Window* window) {
- gfx::Rect bounds(ScreenAsh::GetDisplayBoundsInParent(window));
- int size;
- if (auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) {
- size = kAutoHideSize;
- } else {
- int width, height;
- GetShelfSize(&width, &height);
- size = std::max(width, height);
- }
- AdjustBoundsBasedOnAlignment(size, &bounds);
- return bounds;
-}
-
void ShelfLayoutManager::SetState(VisibilityState visibility_state) {
ShellDelegate* delegate = Shell::GetInstance()->delegate();
State state;
« no previous file with comments | « ash/wm/shelf_layout_manager.h ('k') | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698