| 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 <memory> |
| 9 |
| 8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
| 12 | 13 |
| 13 namespace aura { | 14 namespace aura { |
| 14 class Window; | 15 class Window; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace views { | 18 namespace views { |
| 18 class Widget; | 19 class Widget; |
| 19 } | 20 } |
| 20 | 21 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 31 virtual ~PhantomWindowController(); | 32 virtual ~PhantomWindowController(); |
| 32 | 33 |
| 33 // Shows the phantom window and animates shrinking it to |bounds_in_screen|. | 34 // Shows the phantom window and animates shrinking it to |bounds_in_screen|. |
| 34 void Show(const gfx::Rect& bounds_in_screen); | 35 void Show(const gfx::Rect& bounds_in_screen); |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 friend class PhantomWindowControllerTest; | 38 friend class PhantomWindowControllerTest; |
| 38 | 39 |
| 39 // Creates, shows and returns a phantom widget at |bounds| | 40 // Creates, shows and returns a phantom widget at |bounds| |
| 40 // with kShellWindowId_ShelfContainer in |root_window| as a parent. | 41 // with kShellWindowId_ShelfContainer in |root_window| as a parent. |
| 41 scoped_ptr<views::Widget> CreatePhantomWidget( | 42 std::unique_ptr<views::Widget> CreatePhantomWidget( |
| 42 aura::Window* root_window, | 43 aura::Window* root_window, |
| 43 const gfx::Rect& bounds_in_screen); | 44 const gfx::Rect& bounds_in_screen); |
| 44 | 45 |
| 45 // Window that the phantom window is stacked above. | 46 // Window that the phantom window is stacked above. |
| 46 aura::Window* window_; | 47 aura::Window* window_; |
| 47 | 48 |
| 48 // Target bounds (including the shadows if any) of the animation in screen | 49 // Target bounds (including the shadows if any) of the animation in screen |
| 49 // coordinates. | 50 // coordinates. |
| 50 gfx::Rect target_bounds_in_screen_; | 51 gfx::Rect target_bounds_in_screen_; |
| 51 | 52 |
| 52 // Phantom representation of the window. | 53 // Phantom representation of the window. |
| 53 scoped_ptr<views::Widget> phantom_widget_; | 54 std::unique_ptr<views::Widget> phantom_widget_; |
| 54 | 55 |
| 55 DISALLOW_COPY_AND_ASSIGN(PhantomWindowController); | 56 DISALLOW_COPY_AND_ASSIGN(PhantomWindowController); |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 } // namespace ash | 59 } // namespace ash |
| 59 | 60 |
| 60 #endif // ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ | 61 #endif // ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ |
| OLD | NEW |