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 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2476 NotifyScreenLockRequested(); | 2476 NotifyScreenLockRequested(); |
2477 } | 2477 } |
2478 | 2478 |
2479 void Browser::Shutdown() { | 2479 void Browser::Shutdown() { |
2480 content::RecordAction(UserMetricsAction("Shutdown")); | 2480 content::RecordAction(UserMetricsAction("Shutdown")); |
2481 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | 2481 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
2482 RequestShutdown(); | 2482 RequestShutdown(); |
2483 } | 2483 } |
2484 | 2484 |
2485 void Browser::OpenAdvancedOptionsDialog() { | 2485 void Browser::OpenAdvancedOptionsDialog() { |
| 2486 // TODO(csilv): The main purpose of this method is to expose the date & time |
| 2487 // settings from the clock. Simply showing the options tab not quite enough. |
2486 content::RecordAction(UserMetricsAction("OpenSystemOptionsDialog")); | 2488 content::RecordAction(UserMetricsAction("OpenSystemOptionsDialog")); |
2487 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableUberPage)) | 2489 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableUberPage)) |
2488 ShowOptionsTab(chrome::kSystemOptionsSubPage); | 2490 ShowOptionsTab(chrome::kSystemOptionsSubPage); |
2489 else | 2491 else |
2490 ShowOptionsTab(chrome::kAdvancedOptionsSubPage); | 2492 ShowOptionsTab(""); |
2491 } | 2493 } |
2492 | 2494 |
2493 void Browser::OpenInternetOptionsDialog() { | 2495 void Browser::OpenInternetOptionsDialog() { |
2494 content::RecordAction(UserMetricsAction("OpenInternetOptionsDialog")); | 2496 content::RecordAction(UserMetricsAction("OpenInternetOptionsDialog")); |
2495 ShowOptionsTab(chrome::kInternetOptionsSubPage); | 2497 ShowOptionsTab(chrome::kInternetOptionsSubPage); |
2496 } | 2498 } |
2497 | 2499 |
2498 void Browser::OpenLanguageOptionsDialog() { | 2500 void Browser::OpenLanguageOptionsDialog() { |
2499 content::RecordAction(UserMetricsAction("OpenLanguageOptionsDialog")); | 2501 content::RecordAction(UserMetricsAction("OpenLanguageOptionsDialog")); |
2500 ShowOptionsTab(chrome::kLanguageOptionsSubPage); | 2502 ShowOptionsTab(chrome::kLanguageOptionsSubPage); |
(...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5612 ShowSingletonTabOverwritingNTP(params); | 5614 ShowSingletonTabOverwritingNTP(params); |
5613 } else { | 5615 } else { |
5614 LoginUIServiceFactory::GetForProfile( | 5616 LoginUIServiceFactory::GetForProfile( |
5615 profile()->GetOriginalProfile())->ShowLoginUI(); | 5617 profile()->GetOriginalProfile())->ShowLoginUI(); |
5616 } | 5618 } |
5617 } | 5619 } |
5618 | 5620 |
5619 void Browser::ToggleSpeechInput() { | 5621 void Browser::ToggleSpeechInput() { |
5620 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5622 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
5621 } | 5623 } |
OLD | NEW |