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 <Psapi.h> | 7 #include <Psapi.h> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "chrome/browser/ui/host_desktop.h" | 13 #include "chrome/browser/ui/host_desktop.h" |
14 #include "chrome/test/base/interactive_test_utils_aura.h" | 14 #include "chrome/test/base/interactive_test_utils_aura.h" |
15 #include "ui/aura/window_tree_host.h" | 15 #include "ui/aura/window_tree_host.h" |
16 #include "ui/base/test/ui_controls.h" | 16 #include "ui/base/test/ui_controls.h" |
17 #include "ui/base/win/foreground_helper.h" | 17 #include "ui/base/win/foreground_helper.h" |
| 18 #include "ui/gfx/host_desktop_type.h" |
18 #include "ui/views/focus/focus_manager.h" | 19 #include "ui/views/focus/focus_manager.h" |
19 | 20 |
20 namespace ui_test_utils { | 21 namespace ui_test_utils { |
21 | 22 |
22 void HideNativeWindow(gfx::NativeWindow window) { | 23 void HideNativeWindow(gfx::NativeWindow window) { |
23 if (chrome::GetHostDesktopTypeForNativeWindow(window) == | 24 if (chrome::GetHostDesktopTypeForNativeWindow(window) == |
24 ui::HOST_DESKTOP_TYPE_ASH) { | 25 ui::HOST_DESKTOP_TYPE_ASH) { |
25 HideNativeWindowAura(window); | 26 HideNativeWindowAura(window); |
26 return; | 27 return; |
27 } | 28 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 67 } |
67 } | 68 } |
68 GetWindowText(foreground_window, window_title, arraysize(window_title)); | 69 GetWindowText(foreground_window, window_title, arraysize(window_title)); |
69 LOG(ERROR) << "ShowAndFocusNativeWindow failed. foreground window: " | 70 LOG(ERROR) << "ShowAndFocusNativeWindow failed. foreground window: " |
70 << foreground_window << ", title: " << window_title << ", path: " | 71 << foreground_window << ", title: " << window_title << ", path: " |
71 << path_str; | 72 << path_str; |
72 return false; | 73 return false; |
73 } | 74 } |
74 | 75 |
75 } // namespace ui_test_utils | 76 } // namespace ui_test_utils |
OLD | NEW |