Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: ash/wm/resize_shadow.h

Issue 11275296: Move shadow code to views\corewm (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/image_grid_unittest.cc ('k') | ash/wm/resize_shadow.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 10
11 namespace aura { 11 namespace aura {
12 class Window; 12 class Window;
13 } 13 }
14 namespace gfx { 14 namespace gfx {
15 class Rect; 15 class Rect;
16 } 16 }
17 namespace ui { 17 namespace ui {
18 class Layer; 18 class Layer;
19 } 19 }
20 namespace views {
21 namespace corewm {
22 class ImageGrid;
23 }
24 }
20 25
21 namespace ash { 26 namespace ash {
22 namespace internal { 27 namespace internal {
23 28
24 class ImageGrid;
25
26 // A class to render the resize edge effect when the user moves their mouse 29 // A class to render the resize edge effect when the user moves their mouse
27 // over a sizing edge. This is just a visual effect; the actual resize is 30 // over a sizing edge. This is just a visual effect; the actual resize is
28 // handled by the EventFilter. 31 // handled by the EventFilter.
29 class ResizeShadow { 32 class ResizeShadow {
30 public: 33 public:
31 ResizeShadow(); 34 ResizeShadow();
32 ~ResizeShadow(); 35 ~ResizeShadow();
33 36
34 // Initializes the resize effect layers for a given |window|. 37 // Initializes the resize effect layers for a given |window|.
35 void Init(aura::Window* window); 38 void Init(aura::Window* window);
36 39
37 // Shows resize effects for one or more edges based on a |hit_test| code, such 40 // Shows resize effects for one or more edges based on a |hit_test| code, such
38 // as HTRIGHT or HTBOTTOMRIGHT. 41 // as HTRIGHT or HTBOTTOMRIGHT.
39 void ShowForHitTest(int hit_test); 42 void ShowForHitTest(int hit_test);
40 43
41 // Hides all resize effects. 44 // Hides all resize effects.
42 void Hide(); 45 void Hide();
43 46
44 // Updates the effect positions based on the |bounds| of the window. 47 // Updates the effect positions based on the |bounds| of the window.
45 void Layout(const gfx::Rect& bounds); 48 void Layout(const gfx::Rect& bounds);
46 49
47 private: 50 private:
48 // Images for the shadow effect. 51 // Images for the shadow effect.
49 scoped_ptr<ImageGrid> image_grid_; 52 scoped_ptr<views::corewm::ImageGrid> image_grid_;
50 53
51 // Hit test value from last call to ShowForHitTest(). Used to prevent 54 // Hit test value from last call to ShowForHitTest(). Used to prevent
52 // repeatedly triggering the same animations for the same hit. 55 // repeatedly triggering the same animations for the same hit.
53 int last_hit_test_; 56 int last_hit_test_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(ResizeShadow); 58 DISALLOW_COPY_AND_ASSIGN(ResizeShadow);
56 }; 59 };
57 60
58 } // namespace internal 61 } // namespace internal
59 } // namespace ash 62 } // namespace ash
60 63
61 #endif // ASH_WM_RESIZE_SHADOW_H_ 64 #endif // ASH_WM_RESIZE_SHADOW_H_
OLDNEW
« no previous file with comments | « ash/wm/image_grid_unittest.cc ('k') | ash/wm/resize_shadow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698