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

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

Issue 10008084: Add ctrl+drag feature for allowing resizing window with exact positioning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ctrl-drap for resizing window to pixel level. Created 8 years, 8 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 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const std::vector<aura::Window*>& attached_windows); 45 const std::vector<aura::Window*>& attached_windows);
46 46
47 // Returns true if the drag will result in changing the window in anyway. 47 // Returns true if the drag will result in changing the window in anyway.
48 bool is_resizable() const { return details_.is_resizable; } 48 bool is_resizable() const { return details_.is_resizable; }
49 49
50 const gfx::Point& initial_location_in_parent() const { 50 const gfx::Point& initial_location_in_parent() const {
51 return details_.initial_location_in_parent; 51 return details_.initial_location_in_parent;
52 } 52 }
53 53
54 // Overridden from WindowResizer: 54 // Overridden from WindowResizer:
55 virtual void Drag(const gfx::Point& location) OVERRIDE; 55 virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
56 virtual void CompleteDrag() OVERRIDE; 56 virtual void CompleteDrag() OVERRIDE;
57 virtual void RevertDrag() OVERRIDE; 57 virtual void RevertDrag() OVERRIDE;
58 58
59 private: 59 private:
60 WorkspaceWindowResizer(const Details& details, 60 WorkspaceWindowResizer(const Details& details,
61 const std::vector<aura::Window*>& attached_windows); 61 const std::vector<aura::Window*>& attached_windows);
62 62
63 private: 63 private:
64 // Type of snapping. 64 // Type of snapping.
65 enum SnapType { 65 enum SnapType {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // the screen. 165 // the screen.
166 int num_mouse_moves_since_bounds_change_; 166 int num_mouse_moves_since_bounds_change_;
167 167
168 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); 168 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer);
169 }; 169 };
170 170
171 } // namespace internal 171 } // namespace internal
172 } // namespace ash 172 } // namespace ash
173 173
174 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ 174 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698