| 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/shelf.h" | 10 #include "ash/shelf/shelf.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 void WmShelfAura::UpdateIconPositionForWindow(WmWindow* window) { | 117 void WmShelfAura::UpdateIconPositionForWindow(WmWindow* window) { |
| 118 shelf_->UpdateIconPositionForWindow(WmWindowAura::GetAuraWindow(window)); | 118 shelf_->UpdateIconPositionForWindow(WmWindowAura::GetAuraWindow(window)); |
| 119 } | 119 } |
| 120 | 120 |
| 121 gfx::Rect WmShelfAura::GetScreenBoundsOfItemIconForWindow(WmWindow* window) { | 121 gfx::Rect WmShelfAura::GetScreenBoundsOfItemIconForWindow(WmWindow* window) { |
| 122 return shelf_->GetScreenBoundsOfItemIconForWindow( | 122 return shelf_->GetScreenBoundsOfItemIconForWindow( |
| 123 WmWindowAura::GetAuraWindow(window)); | 123 WmWindowAura::GetAuraWindow(window)); |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool WmShelfAura::ProcessGestureEvent(const ui::GestureEvent& event, |
| 127 WmWindow* target_window) { |
| 128 return gesture_handler_.ProcessGestureEvent( |
| 129 event, WmWindowAura::GetAuraWindow(target_window)); |
| 130 } |
| 131 |
| 126 void WmShelfAura::UpdateAutoHideForMouseEvent(ui::MouseEvent* event) { | 132 void WmShelfAura::UpdateAutoHideForMouseEvent(ui::MouseEvent* event) { |
| 127 // Auto-hide support for ash_sysui. | 133 // Auto-hide support for ash_sysui. |
| 128 if (Shell::GetInstance()->in_mus() && shelf_layout_manager_) | 134 if (Shell::GetInstance()->in_mus() && shelf_layout_manager_) |
| 129 shelf_layout_manager_->UpdateAutoHideForMouseEvent(event); | 135 shelf_layout_manager_->UpdateAutoHideForMouseEvent(event); |
| 130 } | 136 } |
| 131 | 137 |
| 132 void WmShelfAura::UpdateAutoHideForGestureEvent(ui::GestureEvent* event) { | 138 void WmShelfAura::UpdateAutoHideForGestureEvent(ui::GestureEvent* event) { |
| 133 // Auto-hide support for ash_sysui. | 139 // Auto-hide support for ash_sysui. |
| 134 if (Shell::GetInstance()->in_mus() && shelf_layout_manager_) | 140 if (Shell::GetInstance()->in_mus() && shelf_layout_manager_) |
| 135 shelf_layout_manager_->UpdateAutoHideForGestureEvent(event); | 141 shelf_layout_manager_->UpdateAutoHideForGestureEvent(event); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 166 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { | 172 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { |
| 167 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 173 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
| 168 OnAutoHideStateChanged(new_state)); | 174 OnAutoHideStateChanged(new_state)); |
| 169 } | 175 } |
| 170 | 176 |
| 171 void WmShelfAura::OnShelfIconPositionsChanged() { | 177 void WmShelfAura::OnShelfIconPositionsChanged() { |
| 172 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); | 178 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); |
| 173 } | 179 } |
| 174 | 180 |
| 175 } // namespace ash | 181 } // namespace ash |
| OLD | NEW |