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

Side by Side Diff: ash/wm_window.h

Issue 2904273002: [mus+ash] Removes WmWindow from RootWindowcontroller implementation (Closed)
Patch Set: [mus+ash] Removes WmWindow from RootWindowcontroller implementation (rebased) Created 3 years, 7 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/window_util.cc ('k') | ash/wm_window.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WINDOW_H_ 5 #ifndef ASH_WM_WINDOW_H_
6 #define ASH_WM_WINDOW_H_ 6 #define ASH_WM_WINDOW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // null. 80 // null.
81 static aura::Window* GetAuraWindow(WmWindow* wm_window) { 81 static aura::Window* GetAuraWindow(WmWindow* wm_window) {
82 return const_cast<aura::Window*>( 82 return const_cast<aura::Window*>(
83 GetAuraWindow(const_cast<const WmWindow*>(wm_window))); 83 GetAuraWindow(const_cast<const WmWindow*>(wm_window)));
84 } 84 }
85 static const aura::Window* GetAuraWindow(const WmWindow* wm_window); 85 static const aura::Window* GetAuraWindow(const WmWindow* wm_window);
86 86
87 aura::Window* aura_window() { return window_; } 87 aura::Window* aura_window() { return window_; }
88 const aura::Window* aura_window() const { return window_; } 88 const aura::Window* aura_window() const { return window_; }
89 89
90 // See description of |children_use_extended_hit_region_|.
91 bool ShouldUseExtendedHitRegion() const;
92
93 void Destroy(); 90 void Destroy();
94 91
95 WmWindow* GetRootWindow() { 92 WmWindow* GetRootWindow() {
96 return const_cast<WmWindow*>( 93 return const_cast<WmWindow*>(
97 const_cast<const WmWindow*>(this)->GetRootWindow()); 94 const_cast<const WmWindow*>(this)->GetRootWindow());
98 } 95 }
99 const WmWindow* GetRootWindow() const; 96 const WmWindow* GetRootWindow() const;
100 RootWindowController* GetRootWindowController(); 97 RootWindowController* GetRootWindowController();
101 98
102 // See shell_window_ids.h for list of known ids. 99 // See shell_window_ids.h for list of known ids.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 void SetBoundsInScreenBehaviorForChildren(BoundsInScreenBehavior behavior); 269 void SetBoundsInScreenBehaviorForChildren(BoundsInScreenBehavior behavior);
273 270
274 // See description of SnapToPixelBoundaryIfNecessary(). 271 // See description of SnapToPixelBoundaryIfNecessary().
275 void SetSnapsChildrenToPhysicalPixelBoundary(); 272 void SetSnapsChildrenToPhysicalPixelBoundary();
276 273
277 // If an ancestor has been set to snap children to pixel boundaries, then 274 // If an ancestor has been set to snap children to pixel boundaries, then
278 // snaps the layer associated with this window to the layer associated with 275 // snaps the layer associated with this window to the layer associated with
279 // the ancestor. 276 // the ancestor.
280 void SnapToPixelBoundaryIfNecessary(); 277 void SnapToPixelBoundaryIfNecessary();
281 278
282 // Makes the hit region for children slightly larger for easier resizing.
283 void SetChildrenUseExtendedHitRegion();
284
285 void AddTransientWindowObserver(WmTransientWindowObserver* observer); 279 void AddTransientWindowObserver(WmTransientWindowObserver* observer);
286 void RemoveTransientWindowObserver(WmTransientWindowObserver* observer); 280 void RemoveTransientWindowObserver(WmTransientWindowObserver* observer);
287 281
288 private: 282 private:
289 explicit WmWindow(aura::Window* window); 283 explicit WmWindow(aura::Window* window);
290 284
291 // ::wm::TransientWindowObserver overrides: 285 // ::wm::TransientWindowObserver overrides:
292 void OnTransientChildAdded(aura::Window* window, 286 void OnTransientChildAdded(aura::Window* window,
293 aura::Window* transient) override; 287 aura::Window* transient) override;
294 void OnTransientChildRemoved(aura::Window* window, 288 void OnTransientChildRemoved(aura::Window* window,
295 aura::Window* transient) override; 289 aura::Window* transient) override;
296 290
297 aura::Window* window_; 291 aura::Window* window_;
298 292
299 bool added_transient_observer_ = false; 293 bool added_transient_observer_ = false;
300 base::ObserverList<WmTransientWindowObserver> transient_observers_; 294 base::ObserverList<WmTransientWindowObserver> transient_observers_;
301 295
302 // If true child windows should get a slightly larger hit region to make
303 // resizing easier.
304 bool children_use_extended_hit_region_ = false;
305
306 DISALLOW_COPY_AND_ASSIGN(WmWindow); 296 DISALLOW_COPY_AND_ASSIGN(WmWindow);
307 }; 297 };
308 298
309 } // namespace ash 299 } // namespace ash
310 300
311 #endif // ASH_WM_WINDOW_H_ 301 #endif // ASH_WM_WINDOW_H_
OLDNEW
« no previous file with comments | « ash/wm/window_util.cc ('k') | ash/wm_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698