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

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

Issue 2018753003: Moves ash/wm/common back into ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove BUILD.gn again Created 4 years, 6 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/common/window_positioning_utils.h ('k') | ash/wm/common/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_COMMON_WINDOW_RESIZER_H_ 5 #ifndef ASH_WM_COMMON_WINDOW_RESIZER_H_
6 #define ASH_WM_COMMON_WINDOW_RESIZER_H_ 6 #define ASH_WM_COMMON_WINDOW_RESIZER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/wm/common/ash_wm_common_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/wm/common/drag_details.h" 11 #include "ash/wm/common/drag_details.h"
12 #include "ash/wm/common/window_state.h" 12 #include "ash/wm/common/window_state.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "ui/wm/public/window_move_client.h" 14 #include "ui/wm/public/window_move_client.h"
15 15
16 namespace gfx { 16 namespace gfx {
17 class Rect; 17 class Rect;
18 } 18 }
19 19
20 namespace ash { 20 namespace ash {
21 namespace wm { 21 namespace wm {
22 class WmWindow; 22 class WmWindow;
23 } 23 }
24 24
25 // WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving 25 // WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving
26 // or resizing a window. All coordinates passed to this are in the parent 26 // or resizing a window. All coordinates passed to this are in the parent
27 // windows coordinates. 27 // windows coordinates.
28 class ASH_WM_COMMON_EXPORT WindowResizer { 28 class ASH_EXPORT WindowResizer {
29 public: 29 public:
30 // Constants to identify the type of resize. 30 // Constants to identify the type of resize.
31 static const int kBoundsChange_None; 31 static const int kBoundsChange_None;
32 static const int kBoundsChange_Repositions; 32 static const int kBoundsChange_Repositions;
33 static const int kBoundsChange_Resizes; 33 static const int kBoundsChange_Resizes;
34 34
35 // Used to indicate which direction the resize occurs in. 35 // Used to indicate which direction the resize occurs in.
36 static const int kBoundsChangeDirection_None; 36 static const int kBoundsChangeDirection_None;
37 static const int kBoundsChangeDirection_Horizontal; 37 static const int kBoundsChangeDirection_Horizontal;
38 static const int kBoundsChangeDirection_Vertical; 38 static const int kBoundsChangeDirection_Vertical;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 int GetWidthForDrag(int min_width, int* delta_x); 93 int GetWidthForDrag(int min_width, int* delta_x);
94 94
95 // Returns the height of the drag. 95 // Returns the height of the drag.
96 int GetHeightForDrag(int min_height, int* delta_y); 96 int GetHeightForDrag(int min_height, int* delta_y);
97 97
98 DISALLOW_COPY_AND_ASSIGN(WindowResizer); 98 DISALLOW_COPY_AND_ASSIGN(WindowResizer);
99 }; 99 };
100 100
101 // Creates a WindowResizer for |window|. Returns a unique_ptr with null if 101 // Creates a WindowResizer for |window|. Returns a unique_ptr with null if
102 // |window| should not be resized nor dragged. 102 // |window| should not be resized nor dragged.
103 ASH_WM_COMMON_EXPORT std::unique_ptr<WindowResizer> CreateWindowResizer( 103 ASH_EXPORT std::unique_ptr<WindowResizer> CreateWindowResizer(
104 wm::WmWindow* window, 104 wm::WmWindow* window,
105 const gfx::Point& point_in_parent, 105 const gfx::Point& point_in_parent,
106 int window_component, 106 int window_component,
107 aura::client::WindowMoveSource source); 107 aura::client::WindowMoveSource source);
108 108
109 } // namespace ash 109 } // namespace ash
110 110
111 #endif // ASH_WM_COMMON_WINDOW_RESIZER_H_ 111 #endif // ASH_WM_COMMON_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « ash/wm/common/window_positioning_utils.h ('k') | ash/wm/common/window_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698