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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 1964633002: Fix mash shelf alignment change layout regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ash::Shell::GetInstance()->in_mus() instead. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index a24e6a0ea35f7176561fcd2553c7763861d1d3dc..ff95424866e43eb71462d8b27f3d071040a14ef6 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -43,7 +43,6 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/mus/mus_util.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/ui_base_switches.h"
#include "ui/compositor/layer.h"
@@ -521,6 +520,11 @@ void ShelfLayoutManager::OnLockStateChanged(bool locked) {
UpdateShelfVisibilityAfterLoginUIChange();
}
+void ShelfLayoutManager::OnShelfAlignmentChanged(aura::Window* root_window) {
+ if (Shell::GetInstance()->in_mus())
+ LayoutShelf();
+}
+
void ShelfLayoutManager::OnShelfAutoHideBehaviorChanged(
aura::Window* root_window) {
UpdateVisibilityState();
@@ -674,7 +678,7 @@ void ShelfLayoutManager::UpdateBoundsAndOpacity(
GetLayer(shelf_)->SetOpacity(target_bounds.opacity);
// mash::wm::ShelfLayout manages window bounds when running in mash.
- if (!aura::GetMusWindow(shelf_->GetNativeWindow())) {
+ if (!Shell::GetInstance()->in_mus()) {
shelf_->SetBounds(ScreenUtil::ConvertRectToScreen(
shelf_->GetNativeView()->parent(),
target_bounds.shelf_bounds_in_root));
@@ -696,7 +700,7 @@ void ShelfLayoutManager::UpdateBoundsAndOpacity(
gfx::Rect status_bounds = target_bounds.status_bounds_in_shelf;
status_bounds.Offset(target_bounds.shelf_bounds_in_root.OffsetFromOrigin());
// mash::wm::ShelfLayout manages window bounds when running mash.
- if (!aura::GetMusWindow(shelf_->GetNativeWindow())) {
+ if (!Shell::GetInstance()->in_mus()) {
shelf_->status_area_widget()->SetBounds(
ScreenUtil::ConvertRectToScreen(
shelf_->status_area_widget()->GetNativeView()->parent(),
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698