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

Side by Side Diff: ash/wm/common/window_state.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_resizer.h ('k') | ash/wm/common/window_state_delegate.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_STATE_H_ 5 #ifndef ASH_WM_COMMON_WINDOW_STATE_H_
6 #define ASH_WM_COMMON_WINDOW_STATE_H_ 6 #define ASH_WM_COMMON_WINDOW_STATE_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/wm_types.h" 12 #include "ash/wm/common/wm_types.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "ui/base/ui_base_types.h" 16 #include "ui/base/ui_base_types.h"
17 #include "ui/gfx/geometry/insets.h" 17 #include "ui/gfx/geometry/insets.h"
18 18
19 namespace aura { 19 namespace aura {
20 class Window; 20 class Window;
(...skipping 17 matching lines...) Expand all
38 // behavior. Ash specific per-window state (such as ones that controls 38 // behavior. Ash specific per-window state (such as ones that controls
39 // window manager behavior) and ash specific window behavior (such as 39 // window manager behavior) and ash specific window behavior (such as
40 // maximize, minimize, snap sizing etc) should be added here instead 40 // maximize, minimize, snap sizing etc) should be added here instead
41 // of defining separate functions (like |MaximizeWindow(aura::Window* 41 // of defining separate functions (like |MaximizeWindow(aura::Window*
42 // window)|) or using aura Window property. 42 // window)|) or using aura Window property.
43 // The WindowState gets created when first accessed by 43 // The WindowState gets created when first accessed by
44 // |wm::GetWindowState|, and deleted when the window is deleted. 44 // |wm::GetWindowState|, and deleted when the window is deleted.
45 // Prefer using this class instead of passing aura::Window* around in 45 // Prefer using this class instead of passing aura::Window* around in
46 // ash code as this is often what you need to interact with, and 46 // ash code as this is often what you need to interact with, and
47 // accessing the window using |window()| is cheap. 47 // accessing the window using |window()| is cheap.
48 class ASH_WM_COMMON_EXPORT WindowState { 48 class ASH_EXPORT WindowState {
49 public: 49 public:
50 // A subclass of State class represents one of the window's states 50 // A subclass of State class represents one of the window's states
51 // that corresponds to WindowStateType in Ash environment, e.g. 51 // that corresponds to WindowStateType in Ash environment, e.g.
52 // maximized, minimized or side snapped, as subclass. 52 // maximized, minimized or side snapped, as subclass.
53 // Each subclass defines its own behavior and transition for each WMEvent. 53 // Each subclass defines its own behavior and transition for each WMEvent.
54 class State { 54 class State {
55 public: 55 public:
56 State() {} 56 State() {}
57 virtual ~State() {} 57 virtual ~State() {}
58 58
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 std::unique_ptr<State> current_state_; 391 std::unique_ptr<State> current_state_;
392 392
393 DISALLOW_COPY_AND_ASSIGN(WindowState); 393 DISALLOW_COPY_AND_ASSIGN(WindowState);
394 }; 394 };
395 395
396 } // namespace wm 396 } // namespace wm
397 } // namespace ash 397 } // namespace ash
398 398
399 #endif // ASH_WM_COMMON_WINDOW_STATE_H_ 399 #endif // ASH_WM_COMMON_WINDOW_STATE_H_
OLDNEW
« no previous file with comments | « ash/wm/common/window_resizer.h ('k') | ash/wm/common/window_state_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698