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

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

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments Created 8 years, 4 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
OLDNEW
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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 tab_contents-> 371 tab_contents->
372 find_tab_helper()->StartFinding(search_string, forward, match_case); 372 find_tab_helper()->StartFinding(search_string, forward, match_case);
373 FindInPageNotificationObserver observer(tab_contents); 373 FindInPageNotificationObserver observer(tab_contents);
374 if (ordinal) 374 if (ordinal)
375 *ordinal = observer.active_match_ordinal(); 375 *ordinal = observer.active_match_ordinal();
376 return observer.number_of_matches(); 376 return observer.number_of_matches();
377 } 377 }
378 378
379 void CloseAllInfoBars(TabContents* tab) { 379 void CloseAllInfoBars(TabContents* tab) {
380 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper(); 380 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper();
381 while (infobar_helper->infobar_count() > 0) 381 while (infobar_helper->GetInfoBarCount() > 0)
382 infobar_helper->RemoveInfoBar(infobar_helper->GetInfoBarDelegateAt(0)); 382 infobar_helper->RemoveInfoBar(infobar_helper->GetInfoBarDelegateAt(0));
383 } 383 }
384 384
385 void RegisterAndWait(content::NotificationObserver* observer, 385 void RegisterAndWait(content::NotificationObserver* observer,
386 int type, 386 int type,
387 const content::NotificationSource& source) { 387 const content::NotificationSource& source) {
388 content::NotificationRegistrar registrar; 388 content::NotificationRegistrar registrar;
389 registrar.Add(observer, type, source); 389 registrar.Add(observer, type, source);
390 content::RunMessageLoop(); 390 content::RunMessageLoop();
391 } 391 }
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 int state, 703 int state,
704 const base::Closure& followup) { 704 const base::Closure& followup) {
705 if (!followup.is_null()) 705 if (!followup.is_null())
706 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup); 706 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup);
707 else 707 else
708 ui_controls::SendMouseEvents(button, state); 708 ui_controls::SendMouseEvents(button, state);
709 } 709 }
710 710
711 } // namespace internal 711 } // namespace internal
712 } // namespace ui_test_utils 712 } // namespace ui_test_utils
OLDNEW
« chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc ('K') | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698