| Index: ash/mus/disconnected_app_handler.h
|
| diff --git a/ash/mus/disconnected_app_handler.h b/ash/mus/disconnected_app_handler.h
|
| index 042aee325cca4f33b0f9e4c39a707f04b6d049d9..4878f581cb48c834d2006680c5d1206ba5704079 100644
|
| --- a/ash/mus/disconnected_app_handler.h
|
| +++ b/ash/mus/disconnected_app_handler.h
|
| @@ -6,22 +6,30 @@
|
| #define ASH_MUS_DISCONNECTED_APP_HANDLER_H_
|
|
|
| #include "base/macros.h"
|
| -#include "ui/aura/window_tracker.h"
|
| +#include "ui/aura/window_observer.h"
|
|
|
| namespace ash {
|
| namespace mus {
|
|
|
| -// Tracks aura::Windows for when they get disconnected from the embedded app.
|
| -// Destroys the window upon disconnection.
|
| -class DisconnectedAppHandler : public aura::WindowTracker {
|
| +// DisconnectedAppHandler is associated with a single aura Window and deletes
|
| +// the window when the embedded app is disconnected. This is intended to be used
|
| +// for windows created at the request of client apps.
|
| +class DisconnectedAppHandler : public aura::WindowObserver {
|
| public:
|
| - explicit DisconnectedAppHandler(aura::Window* root_window);
|
| + // Public for WindowProperty.
|
| ~DisconnectedAppHandler() override;
|
|
|
| + // Creates a new DisconnectedAppHandler associated with |window|.
|
| + // DisconnectedAppHandler is owned by the window.
|
| + static void Create(aura::Window* window);
|
| +
|
| private:
|
| + explicit DisconnectedAppHandler(aura::Window* root_window);
|
| +
|
| // aura::WindowObserver:
|
| void OnEmbeddedAppDisconnected(aura::Window* window) override;
|
| - void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override;
|
| +
|
| + aura::Window* window_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DisconnectedAppHandler);
|
| };
|
|
|