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

Side by Side Diff: ash/wm/default_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
« no previous file with comments | « no previous file | ash/wm/default_window_resizer.cc » ('j') | ash/wm/default_window_resizer.cc » ('J')
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_DEFAULT_WINDOW_RESIZER_H_ 5 #ifndef ASH_WM_DEFAULT_WINDOW_RESIZER_H_
6 #define ASH_WM_DEFAULT_WINDOW_RESIZER_H_ 6 #define ASH_WM_DEFAULT_WINDOW_RESIZER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/wm/window_resizer.h" 9 #include "ash/wm/window_resizer.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 25 matching lines...) Expand all
36 // returned object. Returns NULL if not resizable. 36 // returned object. Returns NULL if not resizable.
37 static DefaultWindowResizer* Create(aura::Window* window, 37 static DefaultWindowResizer* Create(aura::Window* window,
38 const gfx::Point& location, 38 const gfx::Point& location,
39 int window_component, 39 int window_component,
40 int grid_size); 40 int grid_size);
41 41
42 // Returns true if the drag will result in changing the window in anyway. 42 // Returns true if the drag will result in changing the window in anyway.
43 bool is_resizable() const { return details_.is_resizable; } 43 bool is_resizable() const { return details_.is_resizable; }
44 44
45 // WindowResizer overides: 45 // WindowResizer overides:
46 virtual void Drag(const gfx::Point& location) OVERRIDE; 46 virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
47 virtual void CompleteDrag() OVERRIDE; 47 virtual void CompleteDrag() OVERRIDE;
48 virtual void RevertDrag() OVERRIDE; 48 virtual void RevertDrag() OVERRIDE;
49 49
50 private: 50 private:
51 explicit DefaultWindowResizer(const Details& details); 51 explicit DefaultWindowResizer(const Details& details);
52 52
53 const Details details_; 53 const Details details_;
54 54
55 // Set to true once Drag() is invoked and the bounds of the window change. 55 // Set to true once Drag() is invoked and the bounds of the window change.
56 bool did_move_or_resize_; 56 bool did_move_or_resize_;
57 57
58 internal::RootWindowEventFilter* root_filter_; 58 internal::RootWindowEventFilter* root_filter_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer); 60 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer);
61 }; 61 };
62 62
63 } // namespace aura 63 } // namespace aura
64 64
65 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_ 65 #endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/wm/default_window_resizer.cc » ('j') | ash/wm/default_window_resizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698