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"
17 class TestFocusClient
: public client::FocusClient
,
18 public WindowObserver
{
21 ~TestFocusClient() override
;
24 // Overridden from client::FocusClient:
25 void AddObserver(client::FocusChangeObserver
* observer
) override
;
26 void RemoveObserver(client::FocusChangeObserver
* observer
) override
;
27 void FocusWindow(Window
* window
) override
;
28 void ResetFocusWithinActiveWindow(Window
* window
) override
;
29 Window
* GetFocusedWindow() override
;
31 // Overridden from WindowObserver:
32 void OnWindowDestroying(Window
* window
) override
;
34 Window
* focused_window_
;
35 ScopedObserver
<Window
, WindowObserver
> observer_manager_
;
37 DISALLOW_COPY_AND_ASSIGN(TestFocusClient
);
43 #endif // UI_AURA_TEST_TEST_FOCUS_CLIENT_H_