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

Side by Side Diff: ash/wm/shelf_layout_manager.cc

Issue 9784010: Fixes bug where maximized window wasn't getting resized when toggling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/wm/shelf_layout_manager_unittest.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 #include "ash/wm/shelf_layout_manager.h" 5 #include "ash/wm/shelf_layout_manager.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 gfx::Rect launcher_bounds(launcher_widget()->GetWindowScreenBounds()); 338 gfx::Rect launcher_bounds(launcher_widget()->GetWindowScreenBounds());
339 target_bounds->launcher_bounds = gfx::Rect( 339 target_bounds->launcher_bounds = gfx::Rect(
340 available_bounds.x(), 340 available_bounds.x(),
341 y + (shelf_height_ - launcher_bounds.height()) / 2, 341 y + (shelf_height_ - launcher_bounds.height()) / 2,
342 available_bounds.width(), 342 available_bounds.width(),
343 launcher_bounds.height()); 343 launcher_bounds.height());
344 } 344 }
345 target_bounds->opacity = 345 target_bounds->opacity =
346 (state.visibility_state == VISIBLE || 346 (state.visibility_state == VISIBLE ||
347 state.visibility_state == AUTO_HIDE) ? 1.0f : 0.0f; 347 state.visibility_state == AUTO_HIDE) ? 1.0f : 0.0f;
348 target_bounds->work_area_insets = 348
349 gfx::Insets(0, 0, shelf_height, 0); 349 int work_area_bottom = 0;
350 if (state.visibility_state == VISIBLE)
351 work_area_bottom = shelf_height_;
352 else if (state.visibility_state == AUTO_HIDE)
353 work_area_bottom = kAutoHideHeight;
354 target_bounds->work_area_insets.Set(0, 0, work_area_bottom, 0);
350 } 355 }
351 356
352 void ShelfLayoutManager::UpdateShelfBackground( 357 void ShelfLayoutManager::UpdateShelfBackground(
353 BackgroundAnimator::ChangeType type) { 358 BackgroundAnimator::ChangeType type) {
354 bool launcher_paints = GetLauncherPaintsBackground(); 359 bool launcher_paints = GetLauncherPaintsBackground();
355 if (launcher_) 360 if (launcher_)
356 launcher_->SetPaintsBackground(launcher_paints, type); 361 launcher_->SetPaintsBackground(launcher_paints, type);
357 // SystemTray normally draws a background, but we don't want it to draw a 362 // SystemTray normally draws a background, but we don't want it to draw a
358 // background when the launcher does. 363 // background when the launcher does.
359 if (Shell::GetInstance()->tray()) 364 if (Shell::GetInstance()->tray())
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 insets.Set(kWorkspaceAreaBottomInset, 0, 0, 0); 402 insets.Set(kWorkspaceAreaBottomInset, 0, 0, 0);
398 } 403 }
399 if (launcher_widget() && launcher_widget()->GetNativeWindow()) 404 if (launcher_widget() && launcher_widget()->GetNativeWindow())
400 launcher_widget()->GetNativeWindow()->set_hit_test_bounds_override_outer( 405 launcher_widget()->GetNativeWindow()->set_hit_test_bounds_override_outer(
401 insets); 406 insets);
402 status_->GetNativeWindow()->set_hit_test_bounds_override_outer(insets); 407 status_->GetNativeWindow()->set_hit_test_bounds_override_outer(insets);
403 } 408 }
404 409
405 } // namespace internal 410 } // namespace internal
406 } // namespace ash 411 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698