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

Side by Side Diff: ash/wm/window_resizer.h

Issue 10834097: Allow the user to drag a window from one display to another (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 4 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_WINDOW_RESIZER_H_ 5 #ifndef ASH_WM_WINDOW_RESIZER_H_
6 #define ASH_WM_WINDOW_RESIZER_H_ 6 #define ASH_WM_WINDOW_RESIZER_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 "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // Bitmask of the |kBoundsChangeDirection_| constants. 85 // Bitmask of the |kBoundsChangeDirection_| constants.
86 int size_change_direction; 86 int size_change_direction;
87 87
88 // Will the drag actually modify the window? 88 // Will the drag actually modify the window?
89 bool is_resizable; 89 bool is_resizable;
90 }; 90 };
91 91
92 static gfx::Rect CalculateBoundsForDrag( 92 static gfx::Rect CalculateBoundsForDrag(
93 const Details& details, 93 const Details& details,
94 const gfx::Point& location, 94 const gfx::Point& location_in_screen,
95 int grid_size); 95 int grid_size);
96 96
97 static gfx::Rect AdjustBoundsToGrid(const gfx::Rect& bounds, 97 static gfx::Rect AdjustBoundsToGrid(const gfx::Rect& bounds,
98 int grid_size); 98 int grid_size);
99 99
100 static bool IsBottomEdge(int component); 100 static bool IsBottomEdge(int component);
101 101
102 private: 102 private:
103 // Returns the new origin of the window. The arguments are the difference 103 // Returns the new origin of the window. The arguments are the difference
104 // between the current location and the initial location. 104 // between the current location and the initial location.
(...skipping 16 matching lines...) Expand all
121 // Returns the height of the drag. 121 // Returns the height of the drag.
122 static int GetHeightForDrag(const Details& details, 122 static int GetHeightForDrag(const Details& details,
123 int min_height, 123 int min_height,
124 int* delta_y, 124 int* delta_y,
125 int grid_size); 125 int grid_size);
126 }; 126 };
127 127
128 } // namespace aura 128 } // namespace aura
129 129
130 #endif // ASH_WM_WINDOW_RESIZER_H_ 130 #endif // ASH_WM_WINDOW_RESIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698