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

Unified Diff: ash/wm/aura/wm_window_aura.cc

Issue 1923983003: Makes WorkspaceLayoutManager use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix always-on-top and remove mus changes Created 4 years, 8 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/wm/aura/wm_window_aura.cc
diff --git a/ash/wm/aura/wm_window_aura.cc b/ash/wm/aura/wm_window_aura.cc
index 22b6bd5c1bbe6c4b008b2332521f7ae7d6db294a..51a9ed1edd863c96a3acae13eaa483599111e7ec 100644
--- a/ash/wm/aura/wm_window_aura.cc
+++ b/ash/wm/aura/wm_window_aura.cc
@@ -67,7 +67,10 @@ class BoundsSetter : public aura::LayoutManager {
} // namespace
-WmWindowAura::WmWindowAura(aura::Window* window) : window_(window) {
+WmWindowAura::WmWindowAura(aura::Window* window)
+ : window_(window),
+ // Mirrors that of aura::Window.
+ observers_(base::ObserverList<WmWindowObserver>::NOTIFY_EXISTING_ONLY) {
window_->AddObserver(this);
window_->SetProperty(kWmWindowKey, this);
}
@@ -100,7 +103,8 @@ std::vector<WmWindow*> WmWindowAura::FromAuraWindows(
// static
const aura::Window* WmWindowAura::GetAuraWindow(const WmWindow* wm_window) {
- return static_cast<const WmWindowAura*>(wm_window)->aura_window();
+ return wm_window ? static_cast<const WmWindowAura*>(wm_window)->aura_window()
+ : nullptr;
}
const WmWindow* WmWindowAura::GetRootWindow() const {
@@ -124,7 +128,7 @@ void WmWindowAura::SetShellWindowId(int id) {
window_->set_id(id);
}
-int WmWindowAura::GetShellWindowId() {
+int WmWindowAura::GetShellWindowId() const {
return window_->id();
}

Powered by Google App Engine
This is Rietveld 408576698