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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_window_manager.h

Issue 2091263004: Moves a couple of the maximize mode classes to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 5 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/maximize_mode/DEPS ('k') | ash/wm/maximize_mode/maximize_mode_window_manager.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 5 #ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_
6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 12
13 #include "ash/ash_export.h" 13 #include "ash/ash_export.h"
14 #include "ash/common/shell_observer.h" 14 #include "ash/common/shell_observer.h"
15 #include "ash/common/wm/window_state.h" 15 #include "ash/common/wm/window_state.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "ui/aura/window_observer.h" 18 #include "ui/aura/window_observer.h"
19 #include "ui/display/display_observer.h" 19 #include "ui/display/display_observer.h"
20 #include "ui/events/event_handler.h" 20 #include "ui/events/event_handler.h"
21 21
22 namespace ui { 22 namespace ui {
23 class TouchEvent; 23 class TouchEvent;
24 } 24 }
25 25
26 namespace ash { 26 namespace ash {
27 class MaximizeModeController; 27 class MaximizeModeController;
28 class MaximizeModeWindowState; 28 class MaximizeModeWindowState;
29 class WmWindow;
29 30
30 // A window manager which - when created - will force all windows into maximized 31 // A window manager which - when created - will force all windows into maximized
31 // mode. Exception are panels and windows which cannot be maximized. 32 // mode. Exception are panels and windows which cannot be maximized.
32 // Windows which cannot be maximized / resized are centered with a layer placed 33 // Windows which cannot be maximized / resized are centered with a layer placed
33 // behind the window so that no other windows are visible and/or obscured. 34 // behind the window so that no other windows are visible and/or obscured.
34 // With the destruction of the manager all windows will be restored to their 35 // With the destruction of the manager all windows will be restored to their
35 // original state. 36 // original state.
36 class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver, 37 class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
37 public display::DisplayObserver, 38 public display::DisplayObserver,
38 public ShellObserver, 39 public ShellObserver,
39 public ui::EventHandler { 40 public ui::EventHandler {
40 public: 41 public:
41 // This should only be deleted by the creator (ash::Shell). 42 // This should only be deleted by the creator (ash::Shell).
42 ~MaximizeModeWindowManager() override; 43 ~MaximizeModeWindowManager() override;
43 44
44 // Returns the number of maximized & tracked windows by this manager. 45 // Returns the number of maximized & tracked windows by this manager.
45 int GetNumberOfManagedWindows(); 46 int GetNumberOfManagedWindows();
46 47
47 // Adds a window which needs to be maximized. This is used by other window 48 // Adds a window which needs to be maximized. This is used by other window
48 // managers for windows which needs to get tracked due to (upcoming) state 49 // managers for windows which needs to get tracked due to (upcoming) state
49 // changes. 50 // changes.
50 // The call gets ignored if the window was already or should not be handled. 51 // The call gets ignored if the window was already or should not be handled.
51 void AddWindow(aura::Window* window); 52 void AddWindow(aura::Window* window);
52 53
53 // Called from a window state object when it gets destroyed. 54 // Called from a window state object when it gets destroyed.
54 void WindowStateDestroyed(aura::Window* window); 55 void WindowStateDestroyed(WmWindow* wm_window);
55 56
56 // ShellObserver overrides: 57 // ShellObserver overrides:
57 void OnOverviewModeStarting() override; 58 void OnOverviewModeStarting() override;
58 void OnOverviewModeEnded() override; 59 void OnOverviewModeEnded() override;
59 60
60 // Overridden from WindowObserver: 61 // Overridden from WindowObserver:
61 void OnWindowDestroying(aura::Window* window) override; 62 void OnWindowDestroying(aura::Window* window) override;
62 void OnWindowAdded(aura::Window* window) override; 63 void OnWindowAdded(aura::Window* window) override;
63 void OnWindowPropertyChanged(aura::Window* window, 64 void OnWindowPropertyChanged(aura::Window* window,
64 const void* key, 65 const void* key,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 133
133 // True if all backdrops are hidden. 134 // True if all backdrops are hidden.
134 bool backdrops_hidden_; 135 bool backdrops_hidden_;
135 136
136 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager); 137 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager);
137 }; 138 };
138 139
139 } // namespace ash 140 } // namespace ash
140 141
141 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 142 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/DEPS ('k') | ash/wm/maximize_mode/maximize_mode_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698