Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: chrome/test/base/ui_test_utils_gtk.cc

Issue 8212006: base::Bind: Cleanup in automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac build fix. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/base/ui_test_utils.cc ('k') | chrome/test/base/ui_test_utils_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 gfx::NativeWindow window = browser_window->GetNativeHandle(); 72 gfx::NativeWindow window = browser_window->GetNativeHandle();
73 DCHECK(window); 73 DCHECK(window);
74 GtkWidget* view = ViewIDUtil::GetWidget(GTK_WIDGET(window), vid); 74 GtkWidget* view = ViewIDUtil::GetWidget(GTK_WIDGET(window), vid);
75 #endif 75 #endif
76 76
77 DCHECK(view); 77 DCHECK(view);
78 ui_controls::MoveMouseToCenterAndPress( 78 ui_controls::MoveMouseToCenterAndPress(
79 view, 79 view,
80 ui_controls::LEFT, 80 ui_controls::LEFT,
81 ui_controls::DOWN | ui_controls::UP, 81 ui_controls::DOWN | ui_controls::UP,
82 new MessageLoop::QuitTask()); 82 MessageLoop::QuitClosure());
83 RunMessageLoop(); 83 RunMessageLoop();
84 } 84 }
85 85
86 void HideNativeWindow(gfx::NativeWindow window) { 86 void HideNativeWindow(gfx::NativeWindow window) {
87 gtk_widget_hide(GTK_WIDGET(window)); 87 gtk_widget_hide(GTK_WIDGET(window));
88 } 88 }
89 89
90 void ShowAndFocusNativeWindow(gfx::NativeWindow window) { 90 void ShowAndFocusNativeWindow(gfx::NativeWindow window) {
91 if (gtk_window_has_toplevel_focus(GTK_WINDOW(window))) 91 if (gtk_window_has_toplevel_focus(GTK_WINDOW(window)))
92 return; 92 return;
93 93
94 gtk_window_present(GTK_WINDOW(window)); 94 gtk_window_present(GTK_WINDOW(window));
95 } 95 }
96 96
97 } // namespace ui_test_utils 97 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/test/base/ui_test_utils.cc ('k') | chrome/test/base/ui_test_utils_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698