| 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/common/shelf/shelf_layout_manager.h" | 5 #include "ash/common/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 500 |
| 501 if (delay_background_change) { | 501 if (delay_background_change) { |
| 502 if (update_shelf_observer_) | 502 if (update_shelf_observer_) |
| 503 update_shelf_observer_->Detach(); | 503 update_shelf_observer_->Detach(); |
| 504 // UpdateShelfBackground deletes itself when the animation is done. | 504 // UpdateShelfBackground deletes itself when the animation is done. |
| 505 update_shelf_observer_ = new UpdateShelfObserver(this); | 505 update_shelf_observer_ = new UpdateShelfObserver(this); |
| 506 } else { | 506 } else { |
| 507 UpdateShelfBackground(change_type); | 507 UpdateShelfBackground(change_type); |
| 508 } | 508 } |
| 509 | 509 |
| 510 shelf_widget_->SetDimsShelf(state.visibility_state == SHELF_VISIBLE && | |
| 511 state.window_state == | |
| 512 wm::WORKSPACE_WINDOW_STATE_MAXIMIZED); | |
| 513 | |
| 514 TargetBounds target_bounds; | 510 TargetBounds target_bounds; |
| 515 CalculateTargetBounds(state_, &target_bounds); | 511 CalculateTargetBounds(state_, &target_bounds); |
| 516 UpdateBoundsAndOpacity( | 512 UpdateBoundsAndOpacity( |
| 517 target_bounds, true /* animate */, true /* change_work_area */, | 513 target_bounds, true /* animate */, true /* change_work_area */, |
| 518 delay_background_change ? update_shelf_observer_ : NULL); | 514 delay_background_change ? update_shelf_observer_ : NULL); |
| 519 | 515 |
| 520 // OnAutoHideStateChanged Should be emitted when: | 516 // OnAutoHideStateChanged Should be emitted when: |
| 521 // - firstly state changed to auto-hide from other state | 517 // - firstly state changed to auto-hide from other state |
| 522 // - or, auto_hide_state has changed | 518 // - or, auto_hide_state has changed |
| 523 if ((old_state.visibility_state != state_.visibility_state && | 519 if ((old_state.visibility_state != state_.visibility_state && |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 gesture_drag_status_ = GESTURE_DRAG_NONE; | 1099 gesture_drag_status_ = GESTURE_DRAG_NONE; |
| 1104 } | 1100 } |
| 1105 | 1101 |
| 1106 void ShelfLayoutManager::CancelGestureDrag() { | 1102 void ShelfLayoutManager::CancelGestureDrag() { |
| 1107 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS; | 1103 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS; |
| 1108 UpdateVisibilityState(); | 1104 UpdateVisibilityState(); |
| 1109 gesture_drag_status_ = GESTURE_DRAG_NONE; | 1105 gesture_drag_status_ = GESTURE_DRAG_NONE; |
| 1110 } | 1106 } |
| 1111 | 1107 |
| 1112 } // namespace ash | 1108 } // namespace ash |
| OLD | NEW |