| 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.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 #endif // OS_WIN | 200 #endif // OS_WIN |
| 201 | 201 |
| 202 #if defined(OS_MACOSX) | 202 #if defined(OS_MACOSX) |
| 203 #include "ui/base/cocoa/find_pasteboard.h" | 203 #include "ui/base/cocoa/find_pasteboard.h" |
| 204 #endif | 204 #endif |
| 205 | 205 |
| 206 #if defined(OS_CHROMEOS) | 206 #if defined(OS_CHROMEOS) |
| 207 #include "chrome/browser/chromeos/boot_times_loader.h" | 207 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 208 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 208 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 209 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 209 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
| 210 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_helper.h" | 210 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 211 #if defined(USE_AURA) | 211 #if defined(USE_AURA) |
| 212 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" | 212 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" |
| 213 #endif | 213 #endif |
| 214 #include "chrome/browser/ui/webui/chromeos/active_downloads_ui.h" | 214 #include "chrome/browser/ui/webui/chromeos/active_downloads_ui.h" |
| 215 #endif | 215 #endif |
| 216 | 216 |
| 217 #if defined(USE_ASH) | 217 #if defined(USE_ASH) |
| 218 #include "ash/ash_switches.h" | 218 #include "ash/ash_switches.h" |
| 219 #include "ash/shell.h" | 219 #include "ash/shell.h" |
| 220 #include "chrome/browser/ui/views/ash/panel_view_aura.h" | 220 #include "chrome/browser/ui/views/ash/panel_view_aura.h" |
| (...skipping 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2500 content::RecordAction(UserMetricsAction("OpenFileManager")); | 2500 content::RecordAction(UserMetricsAction("OpenFileManager")); |
| 2501 OpenURL(OpenURLParams(GURL(chrome::kChromeUIFileManagerURL), Referrer(), | 2501 OpenURL(OpenURLParams(GURL(chrome::kChromeUIFileManagerURL), Referrer(), |
| 2502 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false)); | 2502 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false)); |
| 2503 } | 2503 } |
| 2504 #endif | 2504 #endif |
| 2505 | 2505 |
| 2506 #if defined(OS_CHROMEOS) | 2506 #if defined(OS_CHROMEOS) |
| 2507 void Browser::LockScreen() { | 2507 void Browser::LockScreen() { |
| 2508 content::RecordAction(UserMetricsAction("LockScreen")); | 2508 content::RecordAction(UserMetricsAction("LockScreen")); |
| 2509 // Never lock the screen for kiosk mode. | 2509 // Never lock the screen for kiosk mode. |
| 2510 if (chromeos::KioskModeHelper::IsKioskModeEnabled()) | 2510 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) |
| 2511 return; | 2511 return; |
| 2512 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | 2512 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
| 2513 NotifyScreenLockRequested(); | 2513 NotifyScreenLockRequested(); |
| 2514 } | 2514 } |
| 2515 | 2515 |
| 2516 void Browser::Shutdown() { | 2516 void Browser::Shutdown() { |
| 2517 content::RecordAction(UserMetricsAction("Shutdown")); | 2517 content::RecordAction(UserMetricsAction("Shutdown")); |
| 2518 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | 2518 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
| 2519 RequestShutdown(); | 2519 RequestShutdown(); |
| 2520 } | 2520 } |
| (...skipping 3154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5675 } else { | 5675 } else { |
| 5676 LoginUIServiceFactory::GetForProfile( | 5676 LoginUIServiceFactory::GetForProfile( |
| 5677 profile()->GetOriginalProfile())->ShowLoginUI(false); | 5677 profile()->GetOriginalProfile())->ShowLoginUI(false); |
| 5678 } | 5678 } |
| 5679 #endif | 5679 #endif |
| 5680 } | 5680 } |
| 5681 | 5681 |
| 5682 void Browser::ToggleSpeechInput() { | 5682 void Browser::ToggleSpeechInput() { |
| 5683 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5683 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
| 5684 } | 5684 } |
| OLD | NEW |