Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / aura / test / test_focus_client.h
blob06ae3c80c3ca9a665f2f3e5dbc5996aa25a6f3eb
1 // Copyright 2013 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.
5 #ifndef UI_AURA_TEST_TEST_FOCUS_CLIENT_H_
6 #define UI_AURA_TEST_TEST_FOCUS_CLIENT_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/scoped_observer.h"
11 #include "ui/aura/client/focus_client.h"
12 #include "ui/aura/window_observer.h"
14 namespace aura {
15 namespace test {
17 class TestFocusClient : public client::FocusClient,
18 public WindowObserver {
19 public:
20 TestFocusClient();
21 virtual ~TestFocusClient();
23 private:
24 // Overridden from client::FocusClient:
25 virtual void AddObserver(client::FocusChangeObserver* observer) OVERRIDE;
26 virtual void RemoveObserver(client::FocusChangeObserver* observer) OVERRIDE;
27 virtual void FocusWindow(Window* window) OVERRIDE;
28 virtual void ResetFocusWithinActiveWindow(Window* window) OVERRIDE;
29 virtual Window* GetFocusedWindow() OVERRIDE;
31 // Overridden from WindowObserver:
32 virtual void OnWindowDestroying(Window* window) OVERRIDE;
34 Window* focused_window_;
35 ScopedObserver<Window, WindowObserver> observer_manager_;
37 DISALLOW_COPY_AND_ASSIGN(TestFocusClient);
40 } // namespace test
41 } // namespace aura
43 #endif // UI_AURA_TEST_TEST_FOCUS_CLIENT_H_