| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef ASH_WM_RESIZE_SHADOW_H_ | 5 #ifndef ASH_WM_RESIZE_SHADOW_H_ |
| 6 #define ASH_WM_RESIZE_SHADOW_H_ | 6 #define ASH_WM_RESIZE_SHADOW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class ResizeShadow : public aura::WindowObserver { | 25 class ResizeShadow : public aura::WindowObserver { |
| 26 public: | 26 public: |
| 27 explicit ResizeShadow(aura::Window* window); | 27 explicit ResizeShadow(aura::Window* window); |
| 28 ~ResizeShadow() override; | 28 ~ResizeShadow() override; |
| 29 | 29 |
| 30 // aura::WindowObserver: | 30 // aura::WindowObserver: |
| 31 void OnWindowBoundsChanged(aura::Window* window, | 31 void OnWindowBoundsChanged(aura::Window* window, |
| 32 const gfx::Rect& old_bounds, | 32 const gfx::Rect& old_bounds, |
| 33 const gfx::Rect& new_bounds) override; | 33 const gfx::Rect& new_bounds) override; |
| 34 void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override; | 34 void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override; |
| 35 void OnWindowStackingChanged(aura::Window* window) override; |
| 35 | 36 |
| 36 // Shows resize effects for one or more edges based on a |hit_test| code, such | 37 // Shows resize effects for one or more edges based on a |hit_test| code, such |
| 37 // as HTRIGHT or HTBOTTOMRIGHT. | 38 // as HTRIGHT or HTBOTTOMRIGHT. |
| 38 void ShowForHitTest(int hit_test); | 39 void ShowForHitTest(int hit_test); |
| 39 | 40 |
| 40 // Hides all resize effects. | 41 // Hides all resize effects. |
| 41 void Hide(); | 42 void Hide(); |
| 42 | 43 |
| 43 int GetLastHitTestForTest() const { return last_hit_test_; } | 44 int GetLastHitTestForTest() const { return last_hit_test_; } |
| 44 const ui::Layer* GetLayerForTest() const { return layer_.get(); } | 45 const ui::Layer* GetLayerForTest() const { return layer_.get(); } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 59 // Hit test value from last call to ShowForHitTest(). Used to prevent | 60 // Hit test value from last call to ShowForHitTest(). Used to prevent |
| 60 // repeatedly triggering the same animations for the same hit. | 61 // repeatedly triggering the same animations for the same hit. |
| 61 int last_hit_test_; | 62 int last_hit_test_; |
| 62 | 63 |
| 63 DISALLOW_COPY_AND_ASSIGN(ResizeShadow); | 64 DISALLOW_COPY_AND_ASSIGN(ResizeShadow); |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 } // namespace ash | 67 } // namespace ash |
| 67 | 68 |
| 68 #endif // ASH_WM_RESIZE_SHADOW_H_ | 69 #endif // ASH_WM_RESIZE_SHADOW_H_ |
| OLD | NEW |