Commit e8ad5e78 authored by James Cook's avatar James Cook Committed by Commit Bot

chromeos: Remove unused class ash::DisconnectedAppHandler

This was added for mustash, but isn't used anymore.

Bug: none
Change-Id: Ib822df1f0760aa38b038305f5e3f8271b76f976c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2209681
Commit-Queue: Scott Violet <sky@chromium.org>
Auto-Submit: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770783}
parent 2a8b987a
...@@ -260,8 +260,6 @@ component("ash") { ...@@ -260,8 +260,6 @@ component("ash") {
"detachable_base/detachable_base_notification_controller.h", "detachable_base/detachable_base_notification_controller.h",
"detachable_base/detachable_base_observer.h", "detachable_base/detachable_base_observer.h",
"detachable_base/detachable_base_pairing_status.h", "detachable_base/detachable_base_pairing_status.h",
"disconnected_app_handler.cc",
"disconnected_app_handler.h",
"display/cros_display_config.cc", "display/cros_display_config.cc",
"display/cros_display_config.h", "display/cros_display_config.h",
"display/cursor_window_controller.cc", "display/cursor_window_controller.cc",
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/disconnected_app_handler.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ui/aura/window.h"
#include "ui/base/class_property.h"
DEFINE_UI_CLASS_PROPERTY_TYPE(ash::DisconnectedAppHandler*)
namespace ash {
namespace {
DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(DisconnectedAppHandler,
kDisconnectedAppHandlerKey,
nullptr)
} // namespace
// static
void DisconnectedAppHandler::Create(aura::Window* window) {
window->SetProperty(kDisconnectedAppHandlerKey,
new DisconnectedAppHandler(window));
}
DisconnectedAppHandler::DisconnectedAppHandler(aura::Window* window)
: window_(window) {
window->AddObserver(this);
}
DisconnectedAppHandler::~DisconnectedAppHandler() {
window_->RemoveObserver(this);
}
void DisconnectedAppHandler::OnEmbeddedAppDisconnected(aura::Window* window) {
delete window_;
}
} // namespace ash
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_DISCONNECTED_APP_HANDLER_H_
#define ASH_DISCONNECTED_APP_HANDLER_H_
#include "base/macros.h"
#include "ui/aura/window_observer.h"
namespace ash {
// 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. This is only used in mash.
class DisconnectedAppHandler : public aura::WindowObserver {
public:
// 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;
aura::Window* window_;
DISALLOW_COPY_AND_ASSIGN(DisconnectedAppHandler);
};
} // namespace ash
#endif // ASH_DISCONNECTED_APP_HANDLER_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment