| 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/ui_test_utils.h" | 5 #include "chrome/test/base/ui_test_utils.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 content::NotificationService::AllSources()); | 731 content::NotificationService::AllSources()); |
| 732 if (!history_service->BackendLoaded()) | 732 if (!history_service->BackendLoaded()) |
| 733 history_loaded_observer.Wait(); | 733 history_loaded_observer.Wait(); |
| 734 } | 734 } |
| 735 | 735 |
| 736 bool GetNativeWindow(const Browser* browser, gfx::NativeWindow* native_window) { | 736 bool GetNativeWindow(const Browser* browser, gfx::NativeWindow* native_window) { |
| 737 BrowserWindow* window = browser->window(); | 737 BrowserWindow* window = browser->window(); |
| 738 if (!window) | 738 if (!window) |
| 739 return false; | 739 return false; |
| 740 | 740 |
| 741 *native_window = window->GetNativeHandle(); | 741 *native_window = window->GetNativeWindow(); |
| 742 return *native_window; | 742 return *native_window; |
| 743 } | 743 } |
| 744 | 744 |
| 745 bool BringBrowserWindowToFront(const Browser* browser) { | 745 bool BringBrowserWindowToFront(const Browser* browser) { |
| 746 gfx::NativeWindow window = NULL; | 746 gfx::NativeWindow window = NULL; |
| 747 if (!GetNativeWindow(browser, &window)) | 747 if (!GetNativeWindow(browser, &window)) |
| 748 return false; | 748 return false; |
| 749 | 749 |
| 750 return ui_test_utils::ShowAndFocusNativeWindow(window); | 750 return ui_test_utils::ShowAndFocusNativeWindow(window); |
| 751 } | 751 } |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 int state, | 1264 int state, |
| 1265 const base::Closure& followup) { | 1265 const base::Closure& followup) { |
| 1266 if (!followup.is_null()) | 1266 if (!followup.is_null()) |
| 1267 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup); | 1267 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup); |
| 1268 else | 1268 else |
| 1269 ui_controls::SendMouseEvents(button, state); | 1269 ui_controls::SendMouseEvents(button, state); |
| 1270 } | 1270 } |
| 1271 | 1271 |
| 1272 } // namespace internal | 1272 } // namespace internal |
| 1273 } // namespace ui_test_utils | 1273 } // namespace ui_test_utils |
| OLD | NEW |