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_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ | 5 #ifndef ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ |
6 #define ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ | 6 #define ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "ui/gfx/animation/animation_delegate.h" | 12 #include "ui/gfx/animation/animation_delegate.h" |
13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
14 | 14 |
15 namespace aura { | 15 namespace aura { |
16 class RootWindow; | |
17 class Window; | 16 class Window; |
18 } | 17 } |
19 | 18 |
20 namespace gfx { | 19 namespace gfx { |
21 class SlideAnimation; | 20 class SlideAnimation; |
22 } | 21 } |
23 | 22 |
24 namespace views { | 23 namespace views { |
25 class Widget; | 24 class Widget; |
26 } | 25 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 57 } |
59 | 58 |
60 // gfx::AnimationDelegate overrides: | 59 // gfx::AnimationDelegate overrides: |
61 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; | 60 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; |
62 | 61 |
63 private: | 62 private: |
64 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomWindowShow); | 63 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomWindowShow); |
65 | 64 |
66 // Creates, shows and returns a phantom widget at |bounds| | 65 // Creates, shows and returns a phantom widget at |bounds| |
67 // with kShellWindowId_ShelfContainer in |root_window| as a parent. | 66 // with kShellWindowId_ShelfContainer in |root_window| as a parent. |
68 views::Widget* CreatePhantomWidget(aura::RootWindow* root_window, | 67 views::Widget* CreatePhantomWidget(aura::Window* root_window, |
69 const gfx::Rect& bounds_in_screen); | 68 const gfx::Rect& bounds_in_screen); |
70 | 69 |
71 // Window the phantom is placed beneath. | 70 // Window the phantom is placed beneath. |
72 aura::Window* window_; | 71 aura::Window* window_; |
73 | 72 |
74 // If set, the phantom window should get stacked below this window. | 73 // If set, the phantom window should get stacked below this window. |
75 aura::Window* phantom_below_window_; | 74 aura::Window* phantom_below_window_; |
76 | 75 |
77 // Initially the bounds of |window_| (in screen coordinates). | 76 // Initially the bounds of |window_| (in screen coordinates). |
78 // Each time Show() is invoked |start_bounds_| is then reset to the bounds of | 77 // Each time Show() is invoked |start_bounds_| is then reset to the bounds of |
(...skipping 16 matching lines...) Expand all Loading... |
95 // Used to transition the bounds. | 94 // Used to transition the bounds. |
96 scoped_ptr<gfx::SlideAnimation> animation_; | 95 scoped_ptr<gfx::SlideAnimation> animation_; |
97 | 96 |
98 DISALLOW_COPY_AND_ASSIGN(PhantomWindowController); | 97 DISALLOW_COPY_AND_ASSIGN(PhantomWindowController); |
99 }; | 98 }; |
100 | 99 |
101 } // namespace internal | 100 } // namespace internal |
102 } // namespace ash | 101 } // namespace ash |
103 | 102 |
104 #endif // ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ | 103 #endif // ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ |
OLD | NEW |