| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 gfx::Rect WmShelfAura::GetIdealBounds() { | 156 gfx::Rect WmShelfAura::GetIdealBounds() { |
| 157 return shelf_layout_manager_->GetIdealBounds(); | 157 return shelf_layout_manager_->GetIdealBounds(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 gfx::Rect WmShelfAura::GetUserWorkAreaBounds() const { | 160 gfx::Rect WmShelfAura::GetUserWorkAreaBounds() const { |
| 161 return shelf_layout_manager_ ? shelf_layout_manager_->user_work_area_bounds() | 161 return shelf_layout_manager_ ? shelf_layout_manager_->user_work_area_bounds() |
| 162 : gfx::Rect(); | 162 : gfx::Rect(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void WmShelfAura::UpdateIconPositionForWindow(WmWindow* window) { | 165 void WmShelfAura::UpdateIconPositionForWindow(WmWindow* window) { |
| 166 shelf_->UpdateIconPositionForWindow(WmWindowAura::GetAuraWindow(window)); | 166 shelf_->UpdateIconPositionForWindow(window); |
| 167 } | 167 } |
| 168 | 168 |
| 169 gfx::Rect WmShelfAura::GetScreenBoundsOfItemIconForWindow(WmWindow* window) { | 169 gfx::Rect WmShelfAura::GetScreenBoundsOfItemIconForWindow(WmWindow* window) { |
| 170 return shelf_->GetScreenBoundsOfItemIconForWindow( | 170 return shelf_->GetScreenBoundsOfItemIconForWindow(window); |
| 171 WmWindowAura::GetAuraWindow(window)); | |
| 172 } | 171 } |
| 173 | 172 |
| 174 bool WmShelfAura::ProcessGestureEvent(const ui::GestureEvent& event) { | 173 bool WmShelfAura::ProcessGestureEvent(const ui::GestureEvent& event) { |
| 175 // Can be called at login screen. | 174 // Can be called at login screen. |
| 176 if (!shelf_layout_manager_) | 175 if (!shelf_layout_manager_) |
| 177 return false; | 176 return false; |
| 178 return shelf_layout_manager_->ProcessGestureEvent(event); | 177 return shelf_layout_manager_->ProcessGestureEvent(event); |
| 179 } | 178 } |
| 180 | 179 |
| 181 void WmShelfAura::AddObserver(WmShelfObserver* observer) { | 180 void WmShelfAura::AddObserver(WmShelfObserver* observer) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { | 225 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { |
| 227 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 226 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
| 228 OnAutoHideStateChanged(new_state)); | 227 OnAutoHideStateChanged(new_state)); |
| 229 } | 228 } |
| 230 | 229 |
| 231 void WmShelfAura::OnShelfIconPositionsChanged() { | 230 void WmShelfAura::OnShelfIconPositionsChanged() { |
| 232 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); | 231 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); |
| 233 } | 232 } |
| 234 | 233 |
| 235 } // namespace ash | 234 } // namespace ash |
| OLD | NEW |