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

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

Issue 1975873002: Move remaining mus::WindowObserver lifecycle callbacks from PlatformWindowMus to NativeWidgetMus::M… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/mus/platform_window_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/native_widget_mus.cc
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index 52d6b13c3b7821fba5c07b27ffcdeace8eaa849a..230849596946b0ef8d67ab30e4eabc167f88c98b 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -362,6 +362,20 @@ class NativeWidgetMus::MusWindowObserver : public mus::WindowObserver {
}
platform_window_delegate()->OnWindowStateChanged(state);
}
+ void OnWindowDestroyed(mus::Window* window) override {
+ DCHECK_EQ(mus_window(), window);
+ platform_window_delegate()->OnClosed();
+ }
+ void OnWindowFocusChanged(mus::Window* gained_focus,
+ mus::Window* lost_focus) override {
+ if (gained_focus == mus_window())
+ platform_window_delegate()->OnActivationChanged(true);
+ else if (lost_focus == mus_window())
+ platform_window_delegate()->OnActivationChanged(false);
+ }
+ void OnRequestClose(mus::Window* window) override {
+ platform_window_delegate()->OnCloseRequest();
+ }
private:
mus::Window* mus_window() { return native_widget_mus_->window(); }
« no previous file with comments | « no previous file | ui/views/mus/platform_window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698