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/shelf/wm_shelf.h" | 5 #include "ash/shelf/wm_shelf.h" |
6 | 6 |
7 #include "ash/public/cpp/config.h" | 7 #include "ash/public/cpp/config.h" |
8 #include "ash/public/cpp/shelf_item_delegate.h" | 8 #include "ash/public/cpp/shelf_item_delegate.h" |
9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 : shelf_layout_manager_(shelf_layout_manager) { | 43 : shelf_layout_manager_(shelf_layout_manager) { |
44 Shell::Get()->AddPreTargetHandler(this); | 44 Shell::Get()->AddPreTargetHandler(this); |
45 } | 45 } |
46 ~AutoHideEventHandler() override { | 46 ~AutoHideEventHandler() override { |
47 Shell::Get()->RemovePreTargetHandler(this); | 47 Shell::Get()->RemovePreTargetHandler(this); |
48 } | 48 } |
49 | 49 |
50 // Overridden from ui::EventHandler: | 50 // Overridden from ui::EventHandler: |
51 void OnMouseEvent(ui::MouseEvent* event) override { | 51 void OnMouseEvent(ui::MouseEvent* event) override { |
52 shelf_layout_manager_->UpdateAutoHideForMouseEvent( | 52 shelf_layout_manager_->UpdateAutoHideForMouseEvent( |
53 event, WmWindow::Get(static_cast<aura::Window*>(event->target()))); | 53 event, static_cast<aura::Window*>(event->target())); |
54 } | 54 } |
55 void OnGestureEvent(ui::GestureEvent* event) override { | 55 void OnGestureEvent(ui::GestureEvent* event) override { |
56 shelf_layout_manager_->UpdateAutoHideForGestureEvent( | 56 shelf_layout_manager_->UpdateAutoHideForGestureEvent( |
57 event, WmWindow::Get(static_cast<aura::Window*>(event->target()))); | 57 event, static_cast<aura::Window*>(event->target())); |
58 } | 58 } |
59 | 59 |
60 private: | 60 private: |
61 ShelfLayoutManager* shelf_layout_manager_; | 61 ShelfLayoutManager* shelf_layout_manager_; |
62 DISALLOW_COPY_AND_ASSIGN(AutoHideEventHandler); | 62 DISALLOW_COPY_AND_ASSIGN(AutoHideEventHandler); |
63 }; | 63 }; |
64 | 64 |
65 // WmShelf --------------------------------------------------------------------- | 65 // WmShelf --------------------------------------------------------------------- |
66 | 66 |
67 WmShelf::WmShelf() {} | 67 WmShelf::WmShelf() {} |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 374 |
375 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type, | 375 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type, |
376 AnimationChangeType change_type) { | 376 AnimationChangeType change_type) { |
377 if (background_type == GetBackgroundType()) | 377 if (background_type == GetBackgroundType()) |
378 return; | 378 return; |
379 for (auto& observer : observers_) | 379 for (auto& observer : observers_) |
380 observer.OnBackgroundTypeChanged(background_type, change_type); | 380 observer.OnBackgroundTypeChanged(background_type, change_type); |
381 } | 381 } |
382 | 382 |
383 } // namespace ash | 383 } // namespace ash |
OLD | NEW |