| 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/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/rect.h" | 9 #include "ui/gfx/rect.h" |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 explicit TestBrowserWindowOwner(TestBrowserWindow* window) : window_(window) { | 22 explicit TestBrowserWindowOwner(TestBrowserWindow* window) : window_(window) { |
| 23 BrowserList::AddObserver(this); | 23 BrowserList::AddObserver(this); |
| 24 } | 24 } |
| 25 virtual ~TestBrowserWindowOwner() { | 25 virtual ~TestBrowserWindowOwner() { |
| 26 BrowserList::RemoveObserver(this); | 26 BrowserList::RemoveObserver(this); |
| 27 } | 27 } |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 // Overridden from BrowserListObserver: | 30 // Overridden from BrowserListObserver: |
| 31 virtual void OnBrowserRemoved(Browser* browser) OVERRIDE { | 31 virtual void OnBrowserRemoved(Browser* browser) override { |
| 32 if (browser->window() == window_.get()) | 32 if (browser->window() == window_.get()) |
| 33 delete this; | 33 delete this; |
| 34 } | 34 } |
| 35 | 35 |
| 36 scoped_ptr<TestBrowserWindow> window_; | 36 scoped_ptr<TestBrowserWindow> window_; |
| 37 | 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowOwner); | 38 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowOwner); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace | 41 } // namespace |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 } | 216 } |
| 217 | 217 |
| 218 int | 218 int |
| 219 TestBrowserWindow::GetRenderViewHeightInsetWithDetachedBookmarkBar() { | 219 TestBrowserWindow::GetRenderViewHeightInsetWithDetachedBookmarkBar() { |
| 220 return 0; | 220 return 0; |
| 221 } | 221 } |
| 222 | 222 |
| 223 void TestBrowserWindow::ExecuteExtensionCommand( | 223 void TestBrowserWindow::ExecuteExtensionCommand( |
| 224 const extensions::Extension* extension, | 224 const extensions::Extension* extension, |
| 225 const extensions::Command& command) {} | 225 const extensions::Command& command) {} |
| OLD | NEW |