| 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/shelf.h" | 11 #include "ash/shelf/shelf.h" |
| 11 #include "ash/shelf/shelf_layout_manager.h" | 12 #include "ash/shelf/shelf_layout_manager.h" |
| 12 #include "ash/shell.h" | 13 #include "ash/shell.h" |
| 13 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
| 14 | 15 |
| 15 namespace ash { | 16 namespace ash { |
| 16 | 17 |
| 17 // WmShelfAura::AutoHideEventHandler ------------------------------------------- | 18 // WmShelfAura::AutoHideEventHandler ------------------------------------------- |
| 18 | 19 |
| 19 // Forwards mouse and gesture events to ShelfLayoutManager for auto-hide. | 20 // Forwards mouse and gesture events to ShelfLayoutManager for auto-hide. |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 114 } |
| 114 | 115 |
| 115 void WmShelfAura::UpdateAutoHideState() { | 116 void WmShelfAura::UpdateAutoHideState() { |
| 116 shelf_layout_manager_->UpdateAutoHideState(); | 117 shelf_layout_manager_->UpdateAutoHideState(); |
| 117 } | 118 } |
| 118 | 119 |
| 119 ShelfBackgroundType WmShelfAura::GetBackgroundType() const { | 120 ShelfBackgroundType WmShelfAura::GetBackgroundType() const { |
| 120 return shelf_layout_manager_->shelf_widget()->GetBackgroundType(); | 121 return shelf_layout_manager_->shelf_widget()->GetBackgroundType(); |
| 121 } | 122 } |
| 122 | 123 |
| 124 WmDimmerView* WmShelfAura::CreateDimmerView(bool disable_animations_for_test) { |
| 125 return DimmerView::Create(this, disable_animations_for_test); |
| 126 } |
| 127 |
| 123 bool WmShelfAura::IsDimmed() const { | 128 bool WmShelfAura::IsDimmed() const { |
| 124 return shelf_layout_manager_->shelf_widget()->GetDimsShelf(); | 129 return shelf_layout_manager_->shelf_widget()->GetDimsShelf(); |
| 125 } | 130 } |
| 126 | 131 |
| 127 bool WmShelfAura::IsShowingOverflowBubble() const { | 132 bool WmShelfAura::IsShowingOverflowBubble() const { |
| 128 return shelf_->IsShowingOverflowBubble(); | 133 return shelf_->IsShowingOverflowBubble(); |
| 129 } | 134 } |
| 130 | 135 |
| 131 void WmShelfAura::SchedulePaint() { | 136 void WmShelfAura::SchedulePaint() { |
| 132 // Can be called during shutdown if the overflow bubble is visible. | 137 // Can be called during shutdown if the overflow bubble is visible. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { | 225 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { |
| 221 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 226 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
| 222 OnAutoHideStateChanged(new_state)); | 227 OnAutoHideStateChanged(new_state)); |
| 223 } | 228 } |
| 224 | 229 |
| 225 void WmShelfAura::OnShelfIconPositionsChanged() { | 230 void WmShelfAura::OnShelfIconPositionsChanged() { |
| 226 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); | 231 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); |
| 227 } | 232 } |
| 228 | 233 |
| 229 } // namespace ash | 234 } // namespace ash |
| OLD | NEW |