| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/aura/wm_shelf_aura.h" | 5 #include "ash/aura/wm_shelf_aura.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/shelf/wm_shelf_observer.h" | 8 #include "ash/common/shelf/wm_shelf_observer.h" |
| 9 #include "ash/common/wm_window.h" | 9 #include "ash/common/wm_window.h" |
| 10 #include "ash/shelf/dimmer_view.h" | 10 #include "ash/shelf/dimmer_view.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // Can be called during shutdown if the overflow bubble is visible. | 137 // Can be called during shutdown if the overflow bubble is visible. |
| 138 if (shelf_) | 138 if (shelf_) |
| 139 shelf_->SchedulePaint(); | 139 shelf_->SchedulePaint(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 bool WmShelfAura::IsVisible() const { | 142 bool WmShelfAura::IsVisible() const { |
| 143 return shelf_->IsVisible(); | 143 return shelf_->IsVisible(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void WmShelfAura::UpdateVisibilityState() { | 146 void WmShelfAura::UpdateVisibilityState() { |
| 147 shelf_layout_manager_->UpdateVisibilityState(); | 147 if (shelf_layout_manager_) |
| 148 shelf_layout_manager_->UpdateVisibilityState(); |
| 148 } | 149 } |
| 149 | 150 |
| 150 ShelfVisibilityState WmShelfAura::GetVisibilityState() const { | 151 ShelfVisibilityState WmShelfAura::GetVisibilityState() const { |
| 151 return shelf_layout_manager_ ? shelf_layout_manager_->visibility_state() | 152 return shelf_layout_manager_ ? shelf_layout_manager_->visibility_state() |
| 152 : SHELF_HIDDEN; | 153 : SHELF_HIDDEN; |
| 153 } | 154 } |
| 154 | 155 |
| 155 gfx::Rect WmShelfAura::GetIdealBounds() { | 156 gfx::Rect WmShelfAura::GetIdealBounds() { |
| 156 return shelf_layout_manager_->GetIdealBounds(); | 157 return shelf_layout_manager_->GetIdealBounds(); |
| 157 } | 158 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { | 226 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { |
| 226 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 227 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
| 227 OnAutoHideStateChanged(new_state)); | 228 OnAutoHideStateChanged(new_state)); |
| 228 } | 229 } |
| 229 | 230 |
| 230 void WmShelfAura::OnShelfIconPositionsChanged() { | 231 void WmShelfAura::OnShelfIconPositionsChanged() { |
| 231 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); | 232 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); |
| 232 } | 233 } |
| 233 | 234 |
| 234 } // namespace ash | 235 } // namespace ash |
| OLD | NEW |