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

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

Issue 2374613004: Use WmLayoutManager::OnChildWindowVisibilityChanged to update the system modal state. (Closed)
Patch Set: Observe WmLayoutManager::OnChildWindowVisibilityChanged to update the systemo modal state. Created 4 years, 2 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/system_modal_container_layout_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 (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_COMMON_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ 5 #ifndef ASH_COMMON_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_
6 #define ASH_COMMON_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ 6 #define ASH_COMMON_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 18 matching lines...) Expand all
29 : public wm::WmSnapToPixelLayoutManager, 29 : public wm::WmSnapToPixelLayoutManager,
30 public WmWindowObserver, 30 public WmWindowObserver,
31 public keyboard::KeyboardControllerObserver { 31 public keyboard::KeyboardControllerObserver {
32 public: 32 public:
33 explicit SystemModalContainerLayoutManager(WmWindow* container); 33 explicit SystemModalContainerLayoutManager(WmWindow* container);
34 ~SystemModalContainerLayoutManager() override; 34 ~SystemModalContainerLayoutManager() override;
35 35
36 bool has_window_dimmer() const { return window_dimmer_ != nullptr; } 36 bool has_window_dimmer() const { return window_dimmer_ != nullptr; }
37 37
38 // Overridden from WmSnapToPixelLayoutManager: 38 // Overridden from WmSnapToPixelLayoutManager:
39 void OnChildWindowVisibilityChanged(WmWindow* child, bool visible) override;
39 void OnWindowResized() override; 40 void OnWindowResized() override;
40 void OnWindowAddedToLayout(WmWindow* child) override; 41 void OnWindowAddedToLayout(WmWindow* child) override;
41 void OnWillRemoveWindowFromLayout(WmWindow* child) override; 42 void OnWillRemoveWindowFromLayout(WmWindow* child) override;
42 void SetChildBounds(WmWindow* child, 43 void SetChildBounds(WmWindow* child,
43 const gfx::Rect& requested_bounds) override; 44 const gfx::Rect& requested_bounds) override;
44 45
45 // Overridden from WmWindowObserver: 46 // Overridden from WmWindowObserver:
46 void OnWindowPropertyChanged(WmWindow* window, 47 void OnWindowPropertyChanged(WmWindow* window,
47 WmWindowProperty property) override; 48 WmWindowProperty property) override;
48 void OnWindowVisibilityChanged(WmWindow* window, bool visible) override;
49 49
50 // Overridden from keyboard::KeyboardControllerObserver: 50 // Overridden from keyboard::KeyboardControllerObserver:
51 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; 51 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
52 void OnKeyboardClosed() override; 52 void OnKeyboardClosed() override;
53 53
54 // True if the window is either contained by the top most modal window, 54 // True if the window is either contained by the top most modal window,
55 // or contained by its transient children. 55 // or contained by its transient children.
56 bool IsPartOfActiveModalWindow(WmWindow* window); 56 bool IsPartOfActiveModalWindow(WmWindow* window);
57 57
58 // Activates next modal window if any. Returns false if there 58 // Activates next modal window if any. Returns false if there
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Windows contained in this set are centered. Windows are automatically 106 // Windows contained in this set are centered. Windows are automatically
107 // added to this based on IsBoundsCentered(). 107 // added to this based on IsBoundsCentered().
108 std::set<const WmWindow*> windows_to_center_; 108 std::set<const WmWindow*> windows_to_center_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(SystemModalContainerLayoutManager); 110 DISALLOW_COPY_AND_ASSIGN(SystemModalContainerLayoutManager);
111 }; 111 };
112 112
113 } // namespace ash 113 } // namespace ash
114 114
115 #endif // ASH_COMMON_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ 115 #endif // ASH_COMMON_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/wm/system_modal_container_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698