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

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

Issue 101773004: Refactor PhantomWindowController so that the PhantomWindowController owns the phantom window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
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_WINDOW_RESIZER_H_ 5 #ifndef ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
6 #define ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ 6 #define ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/wm/window_resizer.h" 10 #include "ash/wm/window_resizer.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual aura::Window* GetTarget() OVERRIDE; 69 virtual aura::Window* GetTarget() OVERRIDE;
70 virtual const gfx::Point& GetInitialLocation() const OVERRIDE; 70 virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
71 71
72 private: 72 private:
73 WorkspaceWindowResizer(const Details& details, 73 WorkspaceWindowResizer(const Details& details,
74 const std::vector<aura::Window*>& attached_windows); 74 const std::vector<aura::Window*>& attached_windows);
75 75
76 private: 76 private:
77 friend class WorkspaceWindowResizerTest; 77 friend class WorkspaceWindowResizerTest;
78 78
79 // Returns the final bounds to place the window at. This differs from
80 // the current when snapping.
81 gfx::Rect GetFinalBounds(const gfx::Rect& bounds) const;
82
83 // Lays out the attached windows. |bounds| is the bounds of the main window. 79 // Lays out the attached windows. |bounds| is the bounds of the main window.
84 void LayoutAttachedWindows(gfx::Rect* bounds); 80 void LayoutAttachedWindows(gfx::Rect* bounds);
85 81
86 // Calculates the new sizes of the attached windows, given that the main 82 // Calculates the new sizes of the attached windows, given that the main
87 // window has been resized (along the primary axis) by |delta|. 83 // window has been resized (along the primary axis) by |delta|.
88 // |available_size| is the maximum length of the space that the attached 84 // |available_size| is the maximum length of the space that the attached
89 // windows are allowed to occupy (ie: the distance between the right/bottom 85 // windows are allowed to occupy (ie: the distance between the right/bottom
90 // edge of the primary window and the right/bottom of the desktop area). 86 // edge of the primary window and the right/bottom of the desktop area).
91 // Populates |sizes| with the desired sizes of the attached windows, and 87 // Populates |sizes| with the desired sizes of the attached windows, and
92 // returns the number of pixels that couldn't be allocated to the attached 88 // returns the number of pixels that couldn't be allocated to the attached
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // Current instance for use by the WorkspaceWindowResizerTest. 223 // Current instance for use by the WorkspaceWindowResizerTest.
228 static WorkspaceWindowResizer* instance_; 224 static WorkspaceWindowResizer* instance_;
229 225
230 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); 226 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer);
231 }; 227 };
232 228
233 } // namespace internal 229 } // namespace internal
234 } // namespace ash 230 } // namespace ash
235 231
236 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ 232 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace/phantom_window_controller_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698