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

Unified Diff: ash/wm/window_manager_extension.h

Issue 10803037: [WIP] ash/extensions: Add experimental extension support for window-management in ash. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-152100 Created 8 years, 4 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/test/test_shell_delegate.h ('k') | ash/wm/window_manager_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ash/test/test_shell_delegate.h ('k') | ash/wm/window_manager_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698