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/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/host/root_window_host_factory.h" | 8 #include "ash/host/root_window_host_factory.h" |
9 #include "ash/launcher/launcher_types.h" | 9 #include "ash/launcher/launcher_types.h" |
10 #include "ash/magnifier/magnifier_constants.h" | 10 #include "ash/magnifier/magnifier_constants.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 chrome::FocusNextPane(browser); | 158 chrome::FocusNextPane(browser); |
159 break; | 159 break; |
160 case ash::Shell::BACKWARD: | 160 case ash::Shell::BACKWARD: |
161 chrome::FocusPreviousPane(browser); | 161 chrome::FocusPreviousPane(browser); |
162 break; | 162 break; |
163 } | 163 } |
164 return true; | 164 return true; |
165 } | 165 } |
166 | 166 |
167 void ChromeShellDelegate::ShowTaskManager() { | 167 void ChromeShellDelegate::ShowTaskManager() { |
168 Browser* browser = chrome::FindOrCreateTabbedBrowser( | 168 chrome::OpenTaskManager(NULL, false); |
sky
2013/03/20 23:52:08
NULL is ok here, but if the active window is a bro
Mr4D (OOO till 08-26)
2013/03/21 00:20:10
Well - I was under the impression that you wanted
sky
2013/03/21 00:25:55
What I said is that if the active window is a brow
| |
169 ProfileManager::GetDefaultProfileOrOffTheRecord(), | |
170 chrome::HOST_DESKTOP_TYPE_ASH); | |
171 chrome::OpenTaskManager(browser, false); | |
172 } | 169 } |
173 | 170 |
174 content::BrowserContext* ChromeShellDelegate::GetCurrentBrowserContext() { | 171 content::BrowserContext* ChromeShellDelegate::GetCurrentBrowserContext() { |
175 return ProfileManager::GetDefaultProfile(); | 172 return ProfileManager::GetDefaultProfile(); |
176 } | 173 } |
177 | 174 |
178 app_list::AppListViewDelegate* | 175 app_list::AppListViewDelegate* |
179 ChromeShellDelegate::CreateAppListViewDelegate() { | 176 ChromeShellDelegate::CreateAppListViewDelegate() { |
180 DCHECK(ash::Shell::HasInstance()); | 177 DCHECK(ash::Shell::HasInstance()); |
181 // Shell will own the created delegate, and the delegate will own | 178 // Shell will own the created delegate, and the delegate will own |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
330 } | 327 } |
331 | 328 |
332 Browser* ChromeShellDelegate::GetTargetBrowser() { | 329 Browser* ChromeShellDelegate::GetTargetBrowser() { |
333 Browser* browser = chrome::FindBrowserWithWindow(ash::wm::GetActiveWindow()); | 330 Browser* browser = chrome::FindBrowserWithWindow(ash::wm::GetActiveWindow()); |
334 if (browser) | 331 if (browser) |
335 return browser; | 332 return browser; |
336 return chrome::FindOrCreateTabbedBrowser( | 333 return chrome::FindOrCreateTabbedBrowser( |
337 ProfileManager::GetDefaultProfileOrOffTheRecord(), | 334 ProfileManager::GetDefaultProfileOrOffTheRecord(), |
338 chrome::HOST_DESKTOP_TYPE_ASH); | 335 chrome::HOST_DESKTOP_TYPE_ASH); |
339 } | 336 } |
OLD | NEW |