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

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

Issue 1890713002: Adds WmWindow and converts WindowState to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again Created 4 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
« no previous file with comments | « ash/wm/window_positioner_unittest.cc ('k') | ash/wm/window_state.h » ('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_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 <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual void Drag(const gfx::Point& location, int event_flags) = 0; 50 virtual void Drag(const gfx::Point& location, int event_flags) = 0;
51 51
52 // Invoked to complete the drag. 52 // Invoked to complete the drag.
53 virtual void CompleteDrag() = 0; 53 virtual void CompleteDrag() = 0;
54 54
55 // Reverts the drag. 55 // Reverts the drag.
56 virtual void RevertDrag() = 0; 56 virtual void RevertDrag() = 0;
57 57
58 // Returns the target window the resizer was created for. 58 // Returns the target window the resizer was created for.
59 aura::Window* GetTarget() const { 59 aura::Window* GetTarget() const {
60 return window_state_ ? window_state_->window() : NULL; 60 return window_state_ ? window_state_->aura_window() : NULL;
61 } 61 }
62 62
63 // See comment for |DragDetails::initial_location_in_parent|. 63 // See comment for |DragDetails::initial_location_in_parent|.
64 const gfx::Point& GetInitialLocation() const { 64 const gfx::Point& GetInitialLocation() const {
65 return window_state_->drag_details()->initial_location_in_parent; 65 return window_state_->drag_details()->initial_location_in_parent;
66 } 66 }
67 67
68 // Drag parameters established when drag starts. 68 // Drag parameters established when drag starts.
69 const DragDetails& details() const { return *window_state_->drag_details(); } 69 const DragDetails& details() const { return *window_state_->drag_details(); }
70 70
(...skipping 21 matching lines...) Expand all
92 int GetWidthForDrag(int min_width, int* delta_x); 92 int GetWidthForDrag(int min_width, int* delta_x);
93 93
94 // Returns the height of the drag. 94 // Returns the height of the drag.
95 int GetHeightForDrag(int min_height, int* delta_y); 95 int GetHeightForDrag(int min_height, int* delta_y);
96 96
97 DISALLOW_COPY_AND_ASSIGN(WindowResizer); 97 DISALLOW_COPY_AND_ASSIGN(WindowResizer);
98 }; 98 };
99 99
100 // Creates a WindowResizer for |window|. This can return a scoped_ptr 100 // Creates a WindowResizer for |window|. This can return a scoped_ptr
101 // initialized with NULL if |window| should not be resized nor dragged. 101 // initialized with NULL if |window| should not be resized nor dragged.
102 // TODO(sky): move this to its own file. This is aura specific.
102 ASH_EXPORT std::unique_ptr<WindowResizer> CreateWindowResizer( 103 ASH_EXPORT std::unique_ptr<WindowResizer> CreateWindowResizer(
103 aura::Window* window, 104 aura::Window* window,
104 const gfx::Point& point_in_parent, 105 const gfx::Point& point_in_parent,
105 int window_component, 106 int window_component,
106 aura::client::WindowMoveSource source); 107 aura::client::WindowMoveSource source);
107 108
108 } // namespace ash 109 } // namespace ash
109 110
110 #endif // ASH_WM_WINDOW_RESIZER_H_ 111 #endif // ASH_WM_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « ash/wm/window_positioner_unittest.cc ('k') | ash/wm/window_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698