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

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

Issue 1499793003: Fix classes that have too many virtuals for inline constructors. Base URL: https://chromium.googlesource.com/chromium/src.git@enable-virtuals-as-complexity
Patch Set: Finish fixing the codebase that's accessible from Linux. Created 5 years 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
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/test_browser_window.h" 5 #include "chrome/test/base/test_browser_window.h"
6 6
7 #include "chrome/browser/ui/browser_list.h" 7 #include "chrome/browser/ui/browser_list.h"
8 #include "chrome/browser/ui/browser_list_observer.h" 8 #include "chrome/browser/ui/browser_list_observer.h"
9 #include "ui/gfx/geometry/rect.h" 9 #include "ui/gfx/geometry/rect.h"
10 10
11 11
12 // Helpers -------------------------------------------------------------------- 12 // Helpers --------------------------------------------------------------------
13 13
14 namespace chrome { 14 namespace chrome {
15 15
16 scoped_ptr<Browser> CreateBrowserWithTestWindowForParams( 16 scoped_ptr<Browser> CreateBrowserWithTestWindowForParams(
17 Browser::CreateParams* params) { 17 Browser::CreateParams* params) {
18 TestBrowserWindow* window = new TestBrowserWindow; 18 TestBrowserWindow* window = new TestBrowserWindow;
19 new TestBrowserWindowOwner(window); 19 new TestBrowserWindowOwner(window);
20 params->window = window; 20 params->window = window;
21 return make_scoped_ptr(new Browser(*params)); 21 return make_scoped_ptr(new Browser(*params));
22 } 22 }
23 23
24 } // namespace chrome 24 } // namespace chrome
25 25
26 26
27 // TestBrowserWindow::TestLocationBar ----------------------------------------- 27 // TestBrowserWindow::TestLocationBar -----------------------------------------
28 28
29 TestBrowserWindow::TestLocationBar::TestLocationBar() : LocationBar(NULL) {}
30
29 GURL TestBrowserWindow::TestLocationBar::GetDestinationURL() const { 31 GURL TestBrowserWindow::TestLocationBar::GetDestinationURL() const {
30 return GURL(); 32 return GURL();
31 } 33 }
32 34
33 WindowOpenDisposition 35 WindowOpenDisposition
34 TestBrowserWindow::TestLocationBar::GetWindowOpenDisposition() const { 36 TestBrowserWindow::TestLocationBar::GetWindowOpenDisposition() const {
35 return CURRENT_TAB; 37 return CURRENT_TAB;
36 } 38 }
37 39
38 ui::PageTransition 40 ui::PageTransition
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 221 }
220 222
221 TestBrowserWindowOwner::~TestBrowserWindowOwner() { 223 TestBrowserWindowOwner::~TestBrowserWindowOwner() {
222 BrowserList::RemoveObserver(this); 224 BrowserList::RemoveObserver(this);
223 } 225 }
224 226
225 void TestBrowserWindowOwner::OnBrowserRemoved(Browser* browser) { 227 void TestBrowserWindowOwner::OnBrowserRemoved(Browser* browser) {
226 if (browser->window() == window_.get()) 228 if (browser->window() == window_.get())
227 delete this; 229 delete this;
228 } 230 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698