| 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/browser/ui/browser_navigator_browsertest.h" | 5 #include "chrome/browser/ui/browser_navigator_browsertest.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "chrome/browser/chromeos/login/chrome_restart_request.h" | 10 #include "chrome/browser/chromeos/login/chrome_restart_request.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 virtual const std::string& GetWindowOwner(aura::Window* window) OVERRIDE; | 42 virtual const std::string& GetWindowOwner(aura::Window* window) OVERRIDE; |
| 43 virtual void ShowWindowForUser( | 43 virtual void ShowWindowForUser( |
| 44 aura::Window* window, const std::string& user_id) OVERRIDE; | 44 aura::Window* window, const std::string& user_id) OVERRIDE; |
| 45 virtual bool AreWindowsSharedAmongUsers() OVERRIDE; | 45 virtual bool AreWindowsSharedAmongUsers() OVERRIDE; |
| 46 virtual void GetOwnersOfVisibleWindows( | 46 virtual void GetOwnersOfVisibleWindows( |
| 47 std::set<std::string>* user_ids) OVERRIDE; | 47 std::set<std::string>* user_ids) OVERRIDE; |
| 48 virtual bool IsWindowOnDesktopOfUser(aura::Window* window, | 48 virtual bool IsWindowOnDesktopOfUser(aura::Window* window, |
| 49 const std::string& user_id) OVERRIDE; | 49 const std::string& user_id) OVERRIDE; |
| 50 virtual const std::string& GetUserPresentingWindow( | 50 virtual const std::string& GetUserPresentingWindow( |
| 51 aura::Window* window) OVERRIDE; | 51 aura::Window* window) OVERRIDE; |
| 52 virtual void AddUser(Profile* profile) OVERRIDE; | 52 virtual void AddUser(content::BrowserContext* profile) OVERRIDE; |
| 53 virtual void AddObserver(Observer* observer) OVERRIDE; | 53 virtual void AddObserver(Observer* observer) OVERRIDE; |
| 54 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 54 virtual void RemoveObserver(Observer* observer) OVERRIDE; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 // The window of the visiting browser. | 57 // The window of the visiting browser. |
| 58 aura::Window* browser_window_; | 58 aura::Window* browser_window_; |
| 59 // The owner of the visiting browser. | 59 // The owner of the visiting browser. |
| 60 std::string browser_owner_; | 60 std::string browser_owner_; |
| 61 // The owner of the currently shown desktop. | 61 // The owner of the currently shown desktop. |
| 62 std::string desktop_owner_; | 62 std::string desktop_owner_; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 const std::string& TestMultiUserWindowManager::GetUserPresentingWindow( | 129 const std::string& TestMultiUserWindowManager::GetUserPresentingWindow( |
| 130 aura::Window* window) { | 130 aura::Window* window) { |
| 131 if (window == browser_window_) | 131 if (window == browser_window_) |
| 132 return desktop_owner_; | 132 return desktop_owner_; |
| 133 if (created_window_ && window == created_window_) | 133 if (created_window_ && window == created_window_) |
| 134 return created_window_shown_for_; | 134 return created_window_shown_for_; |
| 135 // We can come here before the window gets registered. | 135 // We can come here before the window gets registered. |
| 136 return browser_owner_; | 136 return browser_owner_; |
| 137 } | 137 } |
| 138 | 138 |
| 139 void TestMultiUserWindowManager::AddUser(Profile* profile) { | 139 void TestMultiUserWindowManager::AddUser(content::BrowserContext* profile) { |
| 140 } | 140 } |
| 141 | 141 |
| 142 void TestMultiUserWindowManager::AddObserver(Observer* observer) { | 142 void TestMultiUserWindowManager::AddObserver(Observer* observer) { |
| 143 } | 143 } |
| 144 | 144 |
| 145 void TestMultiUserWindowManager::RemoveObserver(Observer* observer) { | 145 void TestMultiUserWindowManager::RemoveObserver(Observer* observer) { |
| 146 } | 146 } |
| 147 | 147 |
| 148 GURL GetGoogleURL() { | 148 GURL GetGoogleURL() { |
| 149 return GURL("http://www.google.com/"); | 149 return GURL("http://www.google.com/"); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 EXPECT_EQ(3u, chrome::GetTotalBrowserCount()); | 238 EXPECT_EQ(3u, chrome::GetTotalBrowserCount()); |
| 239 | 239 |
| 240 // The ShowWindowForUser should not have been called since the window is | 240 // The ShowWindowForUser should not have been called since the window is |
| 241 // already on the correct desktop. | 241 // already on the correct desktop. |
| 242 ASSERT_FALSE(manager->created_window()); | 242 ASSERT_FALSE(manager->created_window()); |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 | 245 |
| 246 } // namespace | 246 } // namespace |
| OLD | NEW |