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

Side by Side Diff: ui/aura/test/test_activation_client.h

Issue 11418224: Eliminates all ash dependencies from WindowModalityController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 | « ui/aura/client/activation_client.h ('k') | ui/aura/test/test_activation_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ 5 #ifndef UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_
6 #define UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ 6 #define UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/aura/client/activation_client.h" 10 #include "ui/aura/client/activation_client.h"
(...skipping 13 matching lines...) Expand all
24 explicit TestActivationClient(RootWindow* root_window); 24 explicit TestActivationClient(RootWindow* root_window);
25 virtual ~TestActivationClient(); 25 virtual ~TestActivationClient();
26 26
27 // Overridden from client::ActivationClient: 27 // Overridden from client::ActivationClient:
28 virtual void AddObserver(client::ActivationChangeObserver* observer) OVERRIDE; 28 virtual void AddObserver(client::ActivationChangeObserver* observer) OVERRIDE;
29 virtual void RemoveObserver( 29 virtual void RemoveObserver(
30 client::ActivationChangeObserver* observer) OVERRIDE; 30 client::ActivationChangeObserver* observer) OVERRIDE;
31 virtual void ActivateWindow(Window* window) OVERRIDE; 31 virtual void ActivateWindow(Window* window) OVERRIDE;
32 virtual void DeactivateWindow(Window* window) OVERRIDE; 32 virtual void DeactivateWindow(Window* window) OVERRIDE;
33 virtual Window* GetActiveWindow() OVERRIDE; 33 virtual Window* GetActiveWindow() OVERRIDE;
34 virtual Window* GetActivatableWindow(Window* window) OVERRIDE;
34 virtual bool OnWillFocusWindow(Window* window, 35 virtual bool OnWillFocusWindow(Window* window,
35 const ui::Event* event) OVERRIDE; 36 const ui::Event* event) OVERRIDE;
36 virtual bool CanActivateWindow(Window* window) const OVERRIDE; 37 virtual bool CanActivateWindow(Window* window) const OVERRIDE;
37 38
38 // Overridden from WindowObserver: 39 // Overridden from WindowObserver:
39 virtual void OnWindowDestroyed(Window* window) OVERRIDE; 40 virtual void OnWindowDestroyed(Window* window) OVERRIDE;
40 41
41 private: 42 private:
42 void RemoveActiveWindow(Window* window); 43 void RemoveActiveWindow(Window* window);
43 44
44 // This class explicitly does NOT store the active window in a window property 45 // This class explicitly does NOT store the active window in a window property
45 // to make sure that ActivationChangeObserver is not treated as part of the 46 // to make sure that ActivationChangeObserver is not treated as part of the
46 // aura API. Assumptions to that end will cause tests that use this client to 47 // aura API. Assumptions to that end will cause tests that use this client to
47 // fail. 48 // fail.
48 std::vector<Window*> active_windows_; 49 std::vector<Window*> active_windows_;
49 50
50 ObserverList<client::ActivationChangeObserver> observers_; 51 ObserverList<client::ActivationChangeObserver> observers_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(TestActivationClient); 53 DISALLOW_COPY_AND_ASSIGN(TestActivationClient);
53 }; 54 };
54 55
55 } // namespace test 56 } // namespace test
56 } // namespace aura 57 } // namespace aura
57 58
58 #endif // UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ 59 #endif // UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/aura/client/activation_client.h ('k') | ui/aura/test/test_activation_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698