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

Unified Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2655513002: mash: Relay some Chrome aura window properties to Ash. (Closed)
Patch Set: More cleanup. Created 3 years, 11 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: ui/views/mus/desktop_window_tree_host_mus.cc
diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc
index 12d11166f2452f579f464c2aa520cc1357488595..cc5b932147d466c36202487a11b9c503157b8b7d 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -182,6 +182,7 @@ DesktopWindowTreeHostMus::DesktopWindowTreeHostMus(
aura::Env::GetInstance()->AddObserver(this);
MusClient::Get()->AddObserver(this);
native_widget_delegate_->AsWidget()->AddObserver(this);
+ desktop_native_widget_aura->content_window()->AddObserver(this);
sky 2017/01/27 16:20:20 You never remove this observer.
msw 2017/01/27 19:11:34 Now done in the destructor.
// DesktopNativeWidgetAura registers the association between |content_window_|
// and Widget, but code may also want to go from the root (window()) to the
// Widget. This call enables that.
@@ -679,6 +680,11 @@ void DesktopWindowTreeHostMus::OnWindowManagerFrameValuesChanged() {
SendHitTestMaskToServer();
}
+void DesktopWindowTreeHostMus::OnWindowPropertyChanged(aura::Window* window,
+ const void* key) {
+ // Ignore this; window property changes are handled elsewhere.
+}
+
void DesktopWindowTreeHostMus::OnWidgetActivationChanged(Widget* widget,
bool active) {
// TODO(erg): Theoretically, this shouldn't be necessary. We should be able
@@ -688,6 +694,12 @@ void DesktopWindowTreeHostMus::OnWidgetActivationChanged(Widget* widget,
is_active_ = active;
}
+void DesktopWindowTreeHostMus::OnWindowPropertyChanged(aura::Window* window,
+ const void* key,
+ intptr_t old) {
+ MusClient::Get()->OnWindowPropertyChanged(window, key);
sky 2017/01/27 16:20:20 I recommend something like this: MusClient::Get()
msw 2017/01/27 19:11:34 I tried to adopt your suggestions, let me know wha
+}
+
void DesktopWindowTreeHostMus::ShowImpl() {
native_widget_delegate_->OnNativeWidgetVisibilityChanging(true);
// Using ui::SHOW_STATE_NORMAL matches that of DesktopWindowTreeHostX11.

Powered by Google App Engine
This is Rietveld 408576698