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

Unified Diff: ui/views/mus/platform_window_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 | « ui/views/mus/platform_window_mus.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/platform_window_mus.cc
diff --git a/ui/views/mus/platform_window_mus.cc b/ui/views/mus/platform_window_mus.cc
index 75e26ac7bac4e4927365cc12c6a394243066d4c3..99fa1709e15c27778b7590380753f89b4aeb8c8a 100644
--- a/ui/views/mus/platform_window_mus.cc
+++ b/ui/views/mus/platform_window_mus.cc
@@ -71,7 +71,6 @@ PlatformWindowMus::PlatformWindowMus(ui::PlatformWindowDelegate* delegate,
mus_window_destroyed_(false) {
DCHECK(delegate_);
DCHECK(mus_window_);
- mus_window_->AddObserver(this);
mus_window_->set_input_event_handler(this);
// We need accelerated widget numbers to be different for each
@@ -97,10 +96,7 @@ PlatformWindowMus::PlatformWindowMus(ui::PlatformWindowDelegate* delegate,
PlatformWindowMus::~PlatformWindowMus() {
if (!mus_window_)
return;
- mus_window_->RemoveObserver(this);
mus_window_->set_input_event_handler(nullptr);
- if (!mus_window_destroyed_)
- mus_window_->Destroy();
}
void PlatformWindowMus::Show() {}
@@ -155,32 +151,6 @@ ui::PlatformImeController* PlatformWindowMus::GetPlatformImeController() {
return nullptr;
}
-void PlatformWindowMus::OnWindowDestroyed(mus::Window* window) {
- DCHECK_EQ(mus_window_, window);
- mus_window_destroyed_ = true;
-#ifndef NDEBUG
- weak_factory_.reset(new base::WeakPtrFactory<PlatformWindowMus>(this));
- base::WeakPtr<PlatformWindowMus> weak_ptr = weak_factory_->GetWeakPtr();
-#endif
- delegate_->OnClosed();
- // |this| has been destroyed at this point.
-#ifndef NDEBUG
- DCHECK(!weak_ptr);
-#endif
-}
-
-void PlatformWindowMus::OnWindowFocusChanged(mus::Window* gained_focus,
- mus::Window* lost_focus) {
- if (gained_focus == mus_window_)
- delegate_->OnActivationChanged(true);
- else if (lost_focus == mus_window_)
- delegate_->OnActivationChanged(false);
-}
-
-void PlatformWindowMus::OnRequestClose(mus::Window* window) {
- delegate_->OnCloseRequest();
-}
-
void PlatformWindowMus::OnWindowInputEvent(
mus::Window* view,
const ui::Event& event_in,
« no previous file with comments | « ui/views/mus/platform_window_mus.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698