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