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

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

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 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/common/wm/default_state.cc ('k') | ash/common/wm/default_window_resizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_COMMON_WM_DEFAULT_WINDOW_RESIZER_H_
6 #define ASH_COMMON_WM_DEFAULT_WINDOW_RESIZER_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/common/wm/window_resizer.h"
10 #include "base/macros.h"
11
12 namespace ash {
13 class WmShell;
14
15 // WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving
16 // or resizing a window. All coordinates passed to this are in the parent
17 // windows coordiantes.
18 class ASH_EXPORT DefaultWindowResizer : public WindowResizer {
19 public:
20 ~DefaultWindowResizer() override;
21
22 // Creates a new DefaultWindowResizer. The caller takes ownership of the
23 // returned object.
24 static DefaultWindowResizer* Create(wm::WindowState* window_state);
25
26 // Returns true if the drag will result in changing the window in anyway.
27 bool is_resizable() const { return details().is_resizable; }
28
29 bool changed_size() const {
30 return !(details().bounds_change & kBoundsChange_Repositions);
31 }
32
33 // WindowResizer:
34 void Drag(const gfx::Point& location, int event_flags) override;
35 void CompleteDrag() override;
36 void RevertDrag() override;
37
38 private:
39 explicit DefaultWindowResizer(wm::WindowState* window_state);
40
41 // Set to true once Drag() is invoked and the bounds of the window change.
42 bool did_move_or_resize_;
43
44 WmShell* shell_;
45
46 DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer);
47 };
48
49 } // namespace aura
50
51 #endif // ASH_COMMON_WM_DEFAULT_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « ash/common/wm/default_state.cc ('k') | ash/common/wm/default_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698