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

Unified Diff: ash/mus/root_window_controller.cc

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 | « ash/mus/root_window_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/root_window_controller.cc
diff --git a/ash/mus/root_window_controller.cc b/ash/mus/root_window_controller.cc
index e14a347e36d1c128aa01cfbec30a0a045a1dc8a2..53f9a19b392f2a3506cf91a76bc9a59829ae026c 100644
--- a/ash/mus/root_window_controller.cc
+++ b/ash/mus/root_window_controller.cc
@@ -21,6 +21,7 @@
#include "ash/common/wm/root_window_layout_manager.h"
#include "ash/common/wm_window.h"
#include "ash/mus/bridge/wm_shell_mus.h"
+#include "ash/mus/disconnected_app_handler.h"
#include "ash/mus/non_client_frame_controller.h"
#include "ash/mus/property_util.h"
#include "ash/mus/screen_mus.h"
@@ -82,8 +83,6 @@ RootWindowController::RootWindowController(
new ash::RootWindowController(nullptr, window_tree_host.release()));
ash_root_window_controller_->Init(root_window_type);
- disconnected_app_handler_.reset(new DisconnectedAppHandler(root()));
-
for (size_t i = 0; i < kNumActivatableShellWindowIds; ++i) {
window_manager_->window_manager_client()->AddActivationParent(
GetWindowByShellWindowId(kActivatableShellWindowIds[i])->aura_window());
@@ -142,6 +141,7 @@ aura::Window* RootWindowController::NewTopLevelWindow(
NonClientFrameController* non_client_frame_controller =
new NonClientFrameController(container_window, context, bounds,
window_type, properties, window_manager_);
+ DisconnectedAppHandler::Create(non_client_frame_controller->window());
return non_client_frame_controller->window();
}
@@ -157,6 +157,7 @@ aura::Window* RootWindowController::NewTopLevelWindow(
}
window->Init(ui::LAYER_TEXTURED);
window->SetBounds(bounds);
+ DisconnectedAppHandler::Create(window);
if (container_window) {
container_window->AddChild(window);
« no previous file with comments | « ash/mus/root_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698