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

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

Issue 1644773003: Remove BrowserIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host-desktop-1
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | chrome/test/base/ui_test_utils.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/dialog_test_browser_window.h" 5 #include "chrome/test/base/dialog_test_browser_window.h"
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_iterator.h" 8 #include "chrome/browser/ui/browser_list.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
11 11
12 using web_modal::WebContentsModalDialogHost; 12 using web_modal::WebContentsModalDialogHost;
13 using web_modal::ModalDialogHostObserver; 13 using web_modal::ModalDialogHostObserver;
14 14
15 DialogTestBrowserWindow::DialogTestBrowserWindow() { 15 DialogTestBrowserWindow::DialogTestBrowserWindow() {
16 } 16 }
17 17
18 DialogTestBrowserWindow::~DialogTestBrowserWindow() { 18 DialogTestBrowserWindow::~DialogTestBrowserWindow() {
(...skipping 23 matching lines...) Expand all
42 } 42 }
43 43
44 void DialogTestBrowserWindow::AddObserver(ModalDialogHostObserver* observer) { 44 void DialogTestBrowserWindow::AddObserver(ModalDialogHostObserver* observer) {
45 } 45 }
46 46
47 void DialogTestBrowserWindow::RemoveObserver( 47 void DialogTestBrowserWindow::RemoveObserver(
48 ModalDialogHostObserver* observer) { 48 ModalDialogHostObserver* observer) {
49 } 49 }
50 50
51 Browser* DialogTestBrowserWindow::FindBrowser() const { 51 Browser* DialogTestBrowserWindow::FindBrowser() const {
52 for (chrome::BrowserIterator it; !it.done(); it.Next()) { 52 for (auto* browser : *BrowserList::GetInstance()) {
53 Browser* browser = *it;
54 if (browser->window() == this) 53 if (browser->window() == this)
55 return browser; 54 return browser;
56 } 55 }
57 NOTREACHED(); 56 NOTREACHED();
58 return nullptr; 57 return nullptr;
59 } 58 }
60 59
OLDNEW
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698