| 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 27 matching lines...) Expand all Loading... |
| 38 // Shows resize effects for one or more edges based on a |hit_test| code, such | 38 // Shows resize effects for one or more edges based on a |hit_test| code, such |
| 39 // as HTRIGHT or HTBOTTOMRIGHT. | 39 // as HTRIGHT or HTBOTTOMRIGHT. |
| 40 void ShowForHitTest(int hit_test); | 40 void ShowForHitTest(int hit_test); |
| 41 | 41 |
| 42 // Hides all resize effects. | 42 // Hides all resize effects. |
| 43 void Hide(); | 43 void Hide(); |
| 44 | 44 |
| 45 // Updates the effect positions based on the |bounds| of the window. | 45 // Updates the effect positions based on the |bounds| of the window. |
| 46 void Layout(const gfx::Rect& bounds); | 46 void Layout(const gfx::Rect& bounds); |
| 47 | 47 |
| 48 int GetLastHitTestForTest() const { | 48 int GetLastHitTestForTest() const { return last_hit_test_; } |
| 49 return last_hit_test_; | |
| 50 } | |
| 51 | 49 |
| 52 private: | 50 private: |
| 53 // Images for the shadow effect. | 51 // Images for the shadow effect. |
| 54 std::unique_ptr<::wm::ImageGrid> image_grid_; | 52 std::unique_ptr<::wm::ImageGrid> image_grid_; |
| 55 | 53 |
| 56 // Hit test value from last call to ShowForHitTest(). Used to prevent | 54 // Hit test value from last call to ShowForHitTest(). Used to prevent |
| 57 // repeatedly triggering the same animations for the same hit. | 55 // repeatedly triggering the same animations for the same hit. |
| 58 int last_hit_test_; | 56 int last_hit_test_; |
| 59 | 57 |
| 60 DISALLOW_COPY_AND_ASSIGN(ResizeShadow); | 58 DISALLOW_COPY_AND_ASSIGN(ResizeShadow); |
| 61 }; | 59 }; |
| 62 | 60 |
| 63 } // namespace ash | 61 } // namespace ash |
| 64 | 62 |
| 65 #endif // ASH_WM_RESIZE_SHADOW_H_ | 63 #endif // ASH_WM_RESIZE_SHADOW_H_ |
| OLD | NEW |