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

Unified Diff: ash/mus/disconnected_app_handler.h

Issue 2629523006: chromeos: changes DisconnectedAppHandler to be associated with a single window (Closed)
Patch Set: merge 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
« no previous file with comments | « no previous file | ash/mus/disconnected_app_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | ash/mus/disconnected_app_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698