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

Side by Side Diff: ash/wm/workspace/phantom_window_controller.h

Issue 147103003: Fix phantom windows for small windows when using --ash-enable-alternate-caption-button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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 | « no previous file | ash/wm/workspace/phantom_window_controller.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_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
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
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_
OLDNEW
« no previous file with comments | « no previous file | ash/wm/workspace/phantom_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698