| 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 "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/ui/browser_list.h" | 9 #include "chrome/browser/ui/browser_list.h" |
| 10 #include "chrome/browser/ui/browser_list_observer.h" | 10 #include "chrome/browser/ui/browser_list_observer.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 const extensions::Command& command) {} | 191 const extensions::Command& command) {} |
| 192 | 192 |
| 193 ExclusiveAccessContext* TestBrowserWindow::GetExclusiveAccessContext() { | 193 ExclusiveAccessContext* TestBrowserWindow::GetExclusiveAccessContext() { |
| 194 return nullptr; | 194 return nullptr; |
| 195 } | 195 } |
| 196 | 196 |
| 197 std::string TestBrowserWindow::GetWorkspace() const { | 197 std::string TestBrowserWindow::GetWorkspace() const { |
| 198 return std::string(); | 198 return std::string(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 bool TestBrowserWindow::IsVisibleOnAllWorkspaces() const { |
| 202 return false; |
| 203 } |
| 204 |
| 201 // TestBrowserWindowOwner ----------------------------------------------------- | 205 // TestBrowserWindowOwner ----------------------------------------------------- |
| 202 | 206 |
| 203 TestBrowserWindowOwner::TestBrowserWindowOwner(TestBrowserWindow* window) | 207 TestBrowserWindowOwner::TestBrowserWindowOwner(TestBrowserWindow* window) |
| 204 : window_(window) { | 208 : window_(window) { |
| 205 BrowserList::AddObserver(this); | 209 BrowserList::AddObserver(this); |
| 206 } | 210 } |
| 207 | 211 |
| 208 TestBrowserWindowOwner::~TestBrowserWindowOwner() { | 212 TestBrowserWindowOwner::~TestBrowserWindowOwner() { |
| 209 BrowserList::RemoveObserver(this); | 213 BrowserList::RemoveObserver(this); |
| 210 } | 214 } |
| 211 | 215 |
| 212 void TestBrowserWindowOwner::OnBrowserRemoved(Browser* browser) { | 216 void TestBrowserWindowOwner::OnBrowserRemoved(Browser* browser) { |
| 213 if (browser->window() == window_.get()) | 217 if (browser->window() == window_.get()) |
| 214 delete this; | 218 delete this; |
| 215 } | 219 } |
| OLD | NEW |