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

Side by Side Diff: ash/wm/window_manager_extension.h

Issue 10824364: [NOT FOR REVIEW] ash: Add some implementation for the window management extension API. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 "base/memory/scoped_ptr.h"
14 #include "ui/aura/client/activation_change_observer.h"
15 #include "ui/aura/env_observer.h"
16 #include "ui/aura/window_observer.h"
17
18 namespace ash {
19
20 class WindowManagerExtensionDelegate {
21 public:
22 virtual ~WindowManagerExtensionDelegate() {}
23
24 virtual void OnWindowCreated(aura::Window* window) = 0;
25
26 virtual void OnWindowClosed(aura::Window* window) = 0;
27
28 virtual void OnWindowHidden(aura::Window* window) = 0;
29
30 virtual void OnWindowShown(aura::Window* window) = 0;
31
32 virtual void OnActiveWindowChanged(aura::Window* window) = 0;
33 };
34
35 namespace internal {
36
37 class WindowManagerExtension : public aura::EnvObserver,
38 public aura::WindowObserver,
39 public aura::client::ActivationChangeObserver {
40 public:
41 WindowManagerExtension();
42 virtual ~WindowManagerExtension();
43
44 void set_delegate(WindowManagerExtensionDelegate* delegate) {
45 delegate_.reset(delegate);
46 }
47
48 private:
49 // Overridden from aura::EnvObserver:
50 virtual void OnWindowInitialized(aura::Window* window) OVERRIDE;
51
52 // Overridden from aura::WindowObserver:
53 virtual void OnWindowVisibilityChanged(aura::Window* window,
54 bool visible) OVERRIDE;
55 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
56
57 // Overridden from aura::client::ActivationChangeObserver:
58 virtual void OnWindowActivated(aura::Window* active,
59 aura::Window* old_active) OVERRIDE;
60
61 std::vector<aura::Window*> windows_;
62 scoped_ptr<WindowManagerExtensionDelegate> delegate_;
63
64 DISALLOW_COPY_AND_ASSIGN(WindowManagerExtension);
65 };
66
67 } // namespace internal
68 } // namespace ash
69
70 #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