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

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

Issue 2260083002: Register the window in MaximizeModeWindowManager when the window is shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: . Created 4 years, 4 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 | « no previous file | ash/common/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_COMMON_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 5 #ifndef ASH_COMMON_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_
6 #define ASH_COMMON_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 6 #define ASH_COMMON_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 <unordered_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 "ash/common/wm_window_observer.h" 16 #include "ash/common/wm_window_observer.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "ui/display/display_observer.h" 18 #include "ui/display/display_observer.h"
19 19
20 namespace ash { 20 namespace ash {
21 class MaximizeModeController; 21 class MaximizeModeController;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Overridden from WindowObserver: 57 // Overridden from WindowObserver:
58 void OnWindowDestroying(WmWindow* window) override; 58 void OnWindowDestroying(WmWindow* window) override;
59 void OnWindowTreeChanged(WmWindow* window, 59 void OnWindowTreeChanged(WmWindow* window,
60 const TreeChangeParams& params) override; 60 const TreeChangeParams& params) override;
61 void OnWindowPropertyChanged(WmWindow* window, 61 void OnWindowPropertyChanged(WmWindow* window,
62 WmWindowProperty window_property) override; 62 WmWindowProperty window_property) override;
63 void OnWindowBoundsChanged(WmWindow* window, 63 void OnWindowBoundsChanged(WmWindow* window,
64 const gfx::Rect& old_bounds, 64 const gfx::Rect& old_bounds,
65 const gfx::Rect& new_bounds) override; 65 const gfx::Rect& new_bounds) override;
66 void OnWindowVisibilityChanging(WmWindow* window, bool visible) override;
66 67
67 // display::DisplayObserver overrides: 68 // display::DisplayObserver overrides:
68 void OnDisplayAdded(const display::Display& display) override; 69 void OnDisplayAdded(const display::Display& display) override;
69 void OnDisplayRemoved(const display::Display& display) override; 70 void OnDisplayRemoved(const display::Display& display) override;
70 void OnDisplayMetricsChanged(const display::Display& display, 71 void OnDisplayMetricsChanged(const display::Display& display,
71 uint32_t metrics) override; 72 uint32_t metrics) override;
72 73
73 protected: 74 protected:
74 friend class MaximizeModeController; 75 friend class MaximizeModeController;
75 76
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Returns true when the |window| is a container window. 116 // Returns true when the |window| is a container window.
116 bool IsContainerWindow(WmWindow* window); 117 bool IsContainerWindow(WmWindow* window);
117 118
118 // Add a backdrop behind the currently active window on each desktop. 119 // Add a backdrop behind the currently active window on each desktop.
119 void EnableBackdropBehindTopWindowOnEachDisplay(bool enable); 120 void EnableBackdropBehindTopWindowOnEachDisplay(bool enable);
120 121
121 // Every window which got touched by our window manager gets added here. 122 // Every window which got touched by our window manager gets added here.
122 WindowToState window_state_map_; 123 WindowToState window_state_map_;
123 124
124 // All container windows which have to be tracked. 125 // All container windows which have to be tracked.
125 std::set<WmWindow*> observed_container_windows_; 126 std::unordered_set<WmWindow*> observed_container_windows_;
127
128 // Windows added to the container, but not yet shown.
129 std::unordered_set<WmWindow*> added_windows_;
126 130
127 // True if all backdrops are hidden. 131 // True if all backdrops are hidden.
128 bool backdrops_hidden_; 132 bool backdrops_hidden_;
129 133
130 std::unique_ptr<wm::MaximizeModeEventHandler> event_handler_; 134 std::unique_ptr<wm::MaximizeModeEventHandler> event_handler_;
131 135
132 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager); 136 DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager);
133 }; 137 };
134 138
135 } // namespace ash 139 } // namespace ash
136 140
137 #endif // ASH_COMMON_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_ 141 #endif // ASH_COMMON_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/wm/maximize_mode/maximize_mode_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698