| Index: ash/wm/window_manager_extension.h
|
| diff --git a/ash/wm/window_manager_extension.h b/ash/wm/window_manager_extension.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7fffa030542d56063eeedb389373543a544f4d83
|
| --- /dev/null
|
| +++ b/ash/wm/window_manager_extension.h
|
| @@ -0,0 +1,69 @@
|
| +// Copyright (c) 2012 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_WM_WINDOW_MANAGER_EXTENSION_H_
|
| +#define ASH_WM_WINDOW_MANAGER_EXTENSION_H_
|
| +
|
| +#include <vector>
|
| +
|
| +#include "ash/ash_export.h"
|
| +#include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| +#include "ui/aura/client/activation_change_observer.h"
|
| +#include "ui/aura/env_observer.h"
|
| +#include "ui/aura/window_observer.h"
|
| +
|
| +namespace ash {
|
| +
|
| +class WindowManagerExtensionDelegate {
|
| + public:
|
| + virtual ~WindowManagerExtensionDelegate() {}
|
| +
|
| + virtual void OnWindowCreated(const aura::Window* window) = 0;
|
| +
|
| + virtual void OnWindowClosed(const aura::Window* window) = 0;
|
| +
|
| + virtual void OnWindowHidden(const aura::Window* window) = 0;
|
| +
|
| + virtual void OnWindowShown(const aura::Window* window) = 0;
|
| +
|
| + virtual void OnActiveWindowChanged(const aura::Window* window) = 0;
|
| +};
|
| +
|
| +namespace internal {
|
| +
|
| +class WindowManagerExtension : public aura::EnvObserver,
|
| + public aura::WindowObserver,
|
| + public aura::client::ActivationChangeObserver {
|
| + public:
|
| + WindowManagerExtension();
|
| + virtual ~WindowManagerExtension();
|
| +
|
| + void set_delegate(WindowManagerExtensionDelegate* delegate) {
|
| + delegate_ = delegate;
|
| + }
|
| +
|
| + private:
|
| + // Overridden from aura::EnvObserver:
|
| + virtual void OnWindowInitialized(aura::Window* window) OVERRIDE;
|
| +
|
| + // Overridden from aura::WindowObserver:
|
| + virtual void OnWindowVisibilityChanged(aura::Window* window,
|
| + bool visible) OVERRIDE;
|
| + virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
|
| +
|
| + // Overridden from aura::client::ActivationChangeObserver:
|
| + virtual void OnWindowActivated(aura::Window* active,
|
| + aura::Window* old_active) OVERRIDE;
|
| +
|
| + std::vector<aura::Window*> windows_;
|
| + WindowManagerExtensionDelegate* delegate_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(WindowManagerExtension);
|
| +};
|
| +
|
| +} // namespace internal
|
| +} // namespace ash
|
| +
|
| +#endif // ASH_WM_WINDOW_MANAGER_EXTENSION_H_
|
|
|