OLD | NEW |
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 #include "chrome/test/base/interactive_test_utils.h" | 5 #include "chrome/test/base/interactive_test_utils.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" | 12 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" |
13 #include "ui/base/test/ui_controls.h" | 13 #include "ui/base/test/ui_controls.h" |
14 #include "ui/base/win/foreground_helper.h" | 14 #include "ui/base/win/foreground_helper.h" |
15 #include "ui/views/focus/focus_manager.h" | 15 #include "ui/views/focus/focus_manager.h" |
16 | 16 |
17 #if defined(USE_AURA) | 17 #if defined(USE_AURA) |
18 #include "chrome/browser/ui/host_desktop.h" | 18 #include "chrome/browser/ui/host_desktop.h" |
19 #include "chrome/test/base/interactive_test_utils_aura.h" | 19 #include "chrome/test/base/interactive_test_utils_aura.h" |
20 #include "ui/aura/root_window.h" | 20 #include "ui/aura/root_window.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 ui::ForegroundHelper::SetForeground(hwnd); | 54 ui::ForegroundHelper::SetForeground(hwnd); |
55 } | 55 } |
56 | 56 |
57 // ShowWindow does not necessarily activate the window. In particular if a | 57 // ShowWindow does not necessarily activate the window. In particular if a |
58 // window from another app is the foreground window then the request to | 58 // window from another app is the foreground window then the request to |
59 // activate the window fails. See SetForegroundWindow for details. | 59 // activate the window fails. See SetForegroundWindow for details. |
60 return GetForegroundWindow() == hwnd; | 60 return GetForegroundWindow() == hwnd; |
61 } | 61 } |
62 | 62 |
63 } // namespace ui_test_utils | 63 } // namespace ui_test_utils |
OLD | NEW |