| OLD | NEW |
| 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/shelf/shelf_layout_manager.h" | 5 #include "ash/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <cstring> | 9 #include <cstring> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 // this can be simplified. | 738 // this can be simplified. |
| 739 gfx::Rect status_bounds = target_bounds.status_bounds_in_shelf; | 739 gfx::Rect status_bounds = target_bounds.status_bounds_in_shelf; |
| 740 status_bounds.Offset(target_bounds.shelf_bounds_in_root.OffsetFromOrigin()); | 740 status_bounds.Offset(target_bounds.shelf_bounds_in_root.OffsetFromOrigin()); |
| 741 // mash::wm::ShelfLayout manages window bounds when running mash. | 741 // mash::wm::ShelfLayout manages window bounds when running mash. |
| 742 if (!Shell::GetInstance()->in_mus()) { | 742 if (!Shell::GetInstance()->in_mus()) { |
| 743 shelf_widget_->status_area_widget()->SetBounds( | 743 shelf_widget_->status_area_widget()->SetBounds( |
| 744 ScreenUtil::ConvertRectToScreen( | 744 ScreenUtil::ConvertRectToScreen( |
| 745 shelf_widget_->status_area_widget()->GetNativeView()->parent(), | 745 shelf_widget_->status_area_widget()->GetNativeView()->parent(), |
| 746 status_bounds)); | 746 status_bounds)); |
| 747 } | 747 } |
| 748 if (!state_.is_screen_locked) { | 748 // For crbug.com/622431, when the shelf alignment is BOTTOM_LOCKED, we |
| 749 // don't set display work area, as it is not real user-set alignment. |
| 750 if (!state_.is_screen_locked && |
| 751 shelf_widget_->GetAlignment() != SHELF_ALIGNMENT_BOTTOM_LOCKED) { |
| 749 gfx::Insets insets; | 752 gfx::Insets insets; |
| 750 // If user session is blocked (login to new user session or add user to | 753 // If user session is blocked (login to new user session or add user to |
| 751 // the existing session - multi-profile) then give 100% of work area only | 754 // the existing session - multi-profile) then give 100% of work area only |
| 752 // if keyboard is not shown. | 755 // if keyboard is not shown. |
| 753 if (!state_.is_adding_user_screen || !keyboard_bounds_.IsEmpty()) | 756 if (!state_.is_adding_user_screen || !keyboard_bounds_.IsEmpty()) |
| 754 insets = target_bounds.work_area_insets; | 757 insets = target_bounds.work_area_insets; |
| 755 Shell::GetInstance()->SetDisplayWorkAreaInsets(root_window_, insets); | 758 Shell::GetInstance()->SetDisplayWorkAreaInsets(root_window_, insets); |
| 756 } | 759 } |
| 757 } | 760 } |
| 758 | 761 |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 if (ash::MaterialDesignController::IsShelfMaterial()) { | 1208 if (ash::MaterialDesignController::IsShelfMaterial()) { |
| 1206 return (state.visibility_state == SHELF_AUTO_HIDE && | 1209 return (state.visibility_state == SHELF_AUTO_HIDE && |
| 1207 state.auto_hide_state == SHELF_AUTO_HIDE_SHOWN) | 1210 state.auto_hide_state == SHELF_AUTO_HIDE_SHOWN) |
| 1208 ? 1.0f | 1211 ? 1.0f |
| 1209 : 0.0f; | 1212 : 0.0f; |
| 1210 } | 1213 } |
| 1211 return (state.visibility_state == SHELF_AUTO_HIDE) ? 1.0f : 0.0f; | 1214 return (state.visibility_state == SHELF_AUTO_HIDE) ? 1.0f : 0.0f; |
| 1212 } | 1215 } |
| 1213 | 1216 |
| 1214 } // namespace ash | 1217 } // namespace ash |
| OLD | NEW |