| 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/views/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include "ash/launcher/launcher_types.h" | 7 #include "ash/launcher/launcher_types.h" |
| 8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "ash/wm/partial_screenshot_view.h" | 9 #include "ash/wm/partial_screenshot_view.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 content::OpenURLParams(GURL(chrome::kChromeUIMobileSetupURL), | 184 content::OpenURLParams(GURL(chrome::kChromeUIMobileSetupURL), |
| 185 content::Referrer(), | 185 content::Referrer(), |
| 186 NEW_FOREGROUND_TAB, | 186 NEW_FOREGROUND_TAB, |
| 187 content::PAGE_TRANSITION_LINK, | 187 content::PAGE_TRANSITION_LINK, |
| 188 false)); | 188 false)); |
| 189 browser->window()->Activate(); | 189 browser->window()->Activate(); |
| 190 } | 190 } |
| 191 #endif | 191 #endif |
| 192 } | 192 } |
| 193 | 193 |
| 194 content::BrowserContext* ChromeShellDelegate::GetCurrentBrowserContext() { |
| 195 return ProfileManager::GetDefaultProfile(); |
| 196 } |
| 197 |
| 194 void ChromeShellDelegate::ToggleSpokenFeedback() { | 198 void ChromeShellDelegate::ToggleSpokenFeedback() { |
| 195 #if defined(OS_CHROMEOS) | 199 #if defined(OS_CHROMEOS) |
| 196 content::WebUI* login_screen_web_ui = NULL; | 200 content::WebUI* login_screen_web_ui = NULL; |
| 197 chromeos::WebUILoginDisplayHost* host = | 201 chromeos::WebUILoginDisplayHost* host = |
| 198 static_cast<chromeos::WebUILoginDisplayHost*>( | 202 static_cast<chromeos::WebUILoginDisplayHost*>( |
| 199 chromeos::BaseLoginDisplayHost::default_host()); | 203 chromeos::BaseLoginDisplayHost::default_host()); |
| 200 if (host && host->GetOobeUI()) | 204 if (host && host->GetOobeUI()) |
| 201 login_screen_web_ui = host->GetOobeUI()->web_ui(); | 205 login_screen_web_ui = host->GetOobeUI()->web_ui(); |
| 202 chromeos::accessibility::ToggleSpokenFeedback(login_screen_web_ui); | 206 chromeos::accessibility::ToggleSpokenFeedback(login_screen_web_ui); |
| 203 #endif | 207 #endif |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 ash::Shell::GetInstance()->CreateLauncher(); | 252 ash::Shell::GetInstance()->CreateLauncher(); |
| 249 break; | 253 break; |
| 250 default: | 254 default: |
| 251 NOTREACHED() << "Unexpected notification " << type; | 255 NOTREACHED() << "Unexpected notification " << type; |
| 252 } | 256 } |
| 253 #else | 257 #else |
| 254 // MSVC++ warns about switch statements without any cases. | 258 // MSVC++ warns about switch statements without any cases. |
| 255 NOTREACHED() << "Unexpected notification " << type; | 259 NOTREACHED() << "Unexpected notification " << type; |
| 256 #endif | 260 #endif |
| 257 } | 261 } |
| OLD | NEW |