| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_SHELF_SHELF_WINDOW_TARGETER_H_ |
| 6 #define ASH_SHELF_SHELF_WINDOW_TARGETER_H_ |
| 7 |
| 8 #include "ash/common/shelf/wm_shelf_observer.h" |
| 9 #include "ash/common/wm_window_observer.h" |
| 10 #include "base/macros.h" |
| 11 #include "ui/wm/core/easy_resize_window_targeter.h" |
| 12 |
| 13 namespace ash { |
| 14 |
| 15 class WmShelf; |
| 16 |
| 17 // ShelfWindowTargeter makes it easier to resize windows with the mouse when the |
| 18 // window-edge slightly overlaps with the shelf edge. The targeter also makes it |
| 19 // easier to drag the shelf out with touch while it is hidden. |
| 20 class ShelfWindowTargeter : public ::wm::EasyResizeWindowTargeter, |
| 21 public WmWindowObserver, |
| 22 public WmShelfObserver { |
| 23 public: |
| 24 ShelfWindowTargeter(WmWindow* container, WmShelf* shelf); |
| 25 ~ShelfWindowTargeter() override; |
| 26 |
| 27 private: |
| 28 // WmWindowObserver: |
| 29 void OnWindowDestroying(WmWindow* window) override; |
| 30 |
| 31 // WmShelfObserver: |
| 32 void WillChangeVisibilityState(ShelfVisibilityState new_state) override; |
| 33 |
| 34 WmShelf* shelf_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(ShelfWindowTargeter); |
| 37 }; |
| 38 |
| 39 } // namespace ash |
| 40 |
| 41 #endif // ASH_SHELF_SHELF_WINDOW_TARGETER_H_ |
| OLD | NEW |