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

Unified Diff: ash/common/wm_window.h

Issue 2344783002: Wires up WmWindowMus::SetBoundsInScreen() (Closed)
Patch Set: tweaks Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/wm_window.h
diff --git a/ash/common/wm_window.h b/ash/common/wm_window.h
index 4764762eb955aa92e4b7c08d743955603a7777cb..30dc6ab359bac68fb92bcdb2acca1fe7aed16186 100644
--- a/ash/common/wm_window.h
+++ b/ash/common/wm_window.h
@@ -155,7 +155,11 @@ class ASH_EXPORT WmWindow {
const gfx::Rect& screen_bounds) = 0;
virtual void AddChild(WmWindow* window) = 0;
- virtual WmWindow* GetParent() = 0;
+ WmWindow* GetParent() {
+ return const_cast<WmWindow*>(
+ const_cast<const WmWindow*>(this)->GetParent());
+ }
+ virtual const WmWindow* GetParent() const = 0;
WmWindow* GetTransientParent() {
return const_cast<WmWindow*>(
@@ -200,7 +204,7 @@ class ASH_EXPORT WmWindow {
// This is the default.
// USE_SCREEN_COORDINATES: the bounds are actual screen bounds and converted
// from the display. In this case the window may move to a different
- // display if allowed (see SetDescendantsStayInSameRootWindow()).
+ // display if allowed (see SetLockedToRoot()).
James Cook 2016/09/15 16:31:40 Thanks for collapsing these two.
sky 2016/09/15 17:35:03 It was my mistake for introducing the two in the f
virtual void SetBoundsInScreen(const gfx::Rect& bounds_in_screen,
const display::Display& dst_display) = 0;
virtual gfx::Rect GetBoundsInScreen() const = 0;
@@ -228,6 +232,7 @@ class ASH_EXPORT WmWindow {
// If |value| is true the window can not be moved to another root, regardless
// of the bounds set on it.
virtual void SetLockedToRoot(bool value) = 0;
+ virtual bool IsLockedToRoot() const = 0;
virtual void SetCapture() = 0;
virtual bool HasCapture() = 0;
@@ -250,6 +255,7 @@ class ASH_EXPORT WmWindow {
// forward to an associated widget.
virtual void CloseWidget() = 0;
+ virtual void SetFocused() = 0;
virtual bool IsFocused() const = 0;
virtual bool IsActive() const = 0;
@@ -299,10 +305,6 @@ class ASH_EXPORT WmWindow {
// Makes the hit region for children slightly larger for easier resizing.
virtual void SetChildrenUseExtendedHitRegion() = 0;
- // Sets whether descendants of this should not be moved to a different
- // container. This is used by SetBoundsInScreen().
- virtual void SetDescendantsStayInSameRootWindow(bool value) = 0;
-
// Returns a View that renders the contents of this window's layers.
virtual std::unique_ptr<views::View> CreateViewWithRecreatedLayers() = 0;

Powered by Google App Engine
This is Rietveld 408576698