| 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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // If set, the phantom window is stacked below this window, otherwise it | 38 // If set, the phantom window is stacked below this window, otherwise it |
| 39 // is stacked above the window passed to the constructor. | 39 // is stacked above the window passed to the constructor. |
| 40 void set_phantom_below_window(aura::Window* phantom_below_window) { | 40 void set_phantom_below_window(aura::Window* phantom_below_window) { |
| 41 phantom_below_window_ = phantom_below_window; | 41 phantom_below_window_ = phantom_below_window; |
| 42 } | 42 } |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 friend class PhantomWindowControllerTest; | 45 friend class PhantomWindowControllerTest; |
| 46 | 46 |
| 47 // Animates the phantom window towards |bounds_in_screen| when the alternate |
| 48 // caption button style is used. |
| 49 void ShowAlternate(const gfx::Rect& bounds_in_screen); |
| 50 |
| 51 // Animates the phantom window towards |bounds_in_screen| when the legacy |
| 52 // caption button style is used. |
| 53 void ShowLegacy(const gfx::Rect& bounds_in_screen); |
| 54 |
| 47 // Creates, shows and returns a phantom widget at |bounds| | 55 // Creates, shows and returns a phantom widget at |bounds| |
| 48 // with kShellWindowId_ShelfContainer in |root_window| as a parent. | 56 // with kShellWindowId_ShelfContainer in |root_window| as a parent. |
| 49 scoped_ptr<views::Widget> CreatePhantomWidget( | 57 scoped_ptr<views::Widget> CreatePhantomWidget( |
| 50 aura::Window* root_window, | 58 aura::Window* root_window, |
| 51 const gfx::Rect& bounds_in_screen); | 59 const gfx::Rect& bounds_in_screen); |
| 52 | 60 |
| 53 // Window the phantom is placed beneath. | 61 // Window the phantom is placed beneath. |
| 54 aura::Window* window_; | 62 aura::Window* window_; |
| 55 | 63 |
| 56 // If set, the phantom window should get stacked below this window. | 64 // If set, the phantom window should get stacked below this window. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 70 // same root window. Not used when using the alternate caption button style. | 78 // same root window. Not used when using the alternate caption button style. |
| 71 scoped_ptr<views::Widget> phantom_widget_in_start_root_; | 79 scoped_ptr<views::Widget> phantom_widget_in_start_root_; |
| 72 | 80 |
| 73 DISALLOW_COPY_AND_ASSIGN(PhantomWindowController); | 81 DISALLOW_COPY_AND_ASSIGN(PhantomWindowController); |
| 74 }; | 82 }; |
| 75 | 83 |
| 76 } // namespace internal | 84 } // namespace internal |
| 77 } // namespace ash | 85 } // namespace ash |
| 78 | 86 |
| 79 #endif // ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ | 87 #endif // ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_ |
| OLD | NEW |