OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/ui_test_utils.h" | 5 #include "chrome/test/ui_test_utils.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 reinterpret_cast<BrowserView*>(browser_window)->GetViewByID(vid); | 32 reinterpret_cast<BrowserView*>(browser_window)->GetViewByID(vid); |
33 DCHECK(view); | 33 DCHECK(view); |
34 ui_controls::MoveMouseToCenterAndPress( | 34 ui_controls::MoveMouseToCenterAndPress( |
35 view, | 35 view, |
36 ui_controls::LEFT, | 36 ui_controls::LEFT, |
37 ui_controls::DOWN | ui_controls::UP, | 37 ui_controls::DOWN | ui_controls::UP, |
38 new MessageLoop::QuitTask()); | 38 new MessageLoop::QuitTask()); |
39 RunMessageLoop(); | 39 RunMessageLoop(); |
40 } | 40 } |
41 | 41 |
| 42 void HideNativeWindow(gfx::NativeWindow window) { |
| 43 // TODO(jcampan): retrieve the WidgetWin and show/hide on it instead of |
| 44 // using Windows API. |
| 45 ::ShowWindow(window, SW_HIDE); |
| 46 } |
| 47 |
| 48 void ShowAndFocusNativeWindow(gfx::NativeWindow window) { |
| 49 // TODO(jcampan): retrieve the WidgetWin and show/hide on it instead of |
| 50 // using Windows API. |
| 51 ::ShowWindow(window, SW_SHOW); |
| 52 } |
| 53 |
42 } // namespace ui_test_utils | 54 } // namespace ui_test_utils |
OLD | NEW |