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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/test/test_shell_delegate.h ('k') | ash/wm/window_manager_extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_WM_WINDOW_MANAGER_EXTENSION_H_
6 #define ASH_WM_WINDOW_MANAGER_EXTENSION_H_
7
8 #include <vector>
9
10 #include "ash/ash_export.h"
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "ui/aura/client/activation_change_observer.h"
14 #include "ui/aura/env_observer.h"
15 #include "ui/aura/window_observer.h"
16
17 namespace ash {
18
19 class WindowManagerExtensionDelegate {
20 public:
21 virtual ~WindowManagerExtensionDelegate() {}
22
23 virtual void OnWindowCreated(const aura::Window* window) = 0;
24
25 virtual void OnWindowClosed(const aura::Window* window) = 0;
26
27 virtual void OnWindowHidden(const aura::Window* window) = 0;
28
29 virtual void OnWindowShown(const aura::Window* window) = 0;
30
31 virtual void OnActiveWindowChanged(const aura::Window* window) = 0;
32 };
33
34 namespace internal {
35
36 class WindowManagerExtension : public aura::EnvObserver,
37 public aura::WindowObserver,
38 public aura::client::ActivationChangeObserver {
39 public:
40 WindowManagerExtension();
41 virtual ~WindowManagerExtension();
42
43 void set_delegate(WindowManagerExtensionDelegate* delegate) {
44 delegate_ = delegate;
45 }
46
47 private:
48 // Overridden from aura::EnvObserver:
49 virtual void OnWindowInitialized(aura::Window* window) OVERRIDE;
50
51 // Overridden from aura::WindowObserver:
52 virtual void OnWindowVisibilityChanged(aura::Window* window,
53 bool visible) OVERRIDE;
54 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
55
56 // Overridden from aura::client::ActivationChangeObserver:
57 virtual void OnWindowActivated(aura::Window* active,
58 aura::Window* old_active) OVERRIDE;
59
60 std::vector<aura::Window*> windows_;
61 WindowManagerExtensionDelegate* delegate_;
62
63 DISALLOW_COPY_AND_ASSIGN(WindowManagerExtension);
64 };
65
66 } // namespace internal
67 } // namespace ash
68
69 #endif // ASH_WM_WINDOW_MANAGER_EXTENSION_H_
OLDNEW
« 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