
The only ick in this patch is allowing circular deps on wayland and exo. This is necessary because WindowManagerService includes wayland, wayland includes ash... BUG=784945 TEST=no functional changes TBR=tsepez@chromium.org Change-Id: If62836861c7db7e0af62cea4a3b8c18fb2aa4675 Reviewed-on: https://chromium-review.googlesource.com/775579 Commit-Queue: Scott Violet <sky@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: James Cook <jamescook@chromium.org> Reviewed-by: David Reveman <reveman@chromium.org> Cr-Commit-Position: refs/heads/master@{#517569}
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
// 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_
|