| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "chrome/browser/chromeos/login/login_wizard.h" | 60 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 61 #include "chrome/browser/chromeos/login/supervised_user_manager.h" | 61 #include "chrome/browser/chromeos/login/supervised_user_manager.h" |
| 62 #include "chrome/browser/chromeos/login/user.h" | 62 #include "chrome/browser/chromeos/login/user.h" |
| 63 #include "chrome/browser/chromeos/login/user_adding_screen.h" | 63 #include "chrome/browser/chromeos/login/user_adding_screen.h" |
| 64 #include "chrome/browser/chromeos/login/user_manager.h" | 64 #include "chrome/browser/chromeos/login/user_manager.h" |
| 65 #include "chrome/browser/chromeos/net/network_portal_detector.h" | 65 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
| 66 #include "chrome/browser/chromeos/options/network_config_view.h" | 66 #include "chrome/browser/chromeos/options/network_config_view.h" |
| 67 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 67 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 68 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 68 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 69 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" | 69 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" |
| 70 #include "chrome/browser/chromeos/set_time_dialog.h" |
| 70 #include "chrome/browser/chromeos/settings/cros_settings.h" | 71 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 71 #include "chrome/browser/chromeos/sim_dialog_delegate.h" | 72 #include "chrome/browser/chromeos/sim_dialog_delegate.h" |
| 72 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" | 73 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" |
| 73 #include "chrome/browser/drive/drive_service_interface.h" | 74 #include "chrome/browser/drive/drive_service_interface.h" |
| 74 #include "chrome/browser/feedback/tracing_manager.h" | 75 #include "chrome/browser/feedback/tracing_manager.h" |
| 75 #include "chrome/browser/google/google_util.h" | 76 #include "chrome/browser/google/google_util.h" |
| 76 #include "chrome/browser/lifetime/application_lifetime.h" | 77 #include "chrome/browser/lifetime/application_lifetime.h" |
| 77 #include "chrome/browser/profiles/profile_manager.h" | 78 #include "chrome/browser/profiles/profile_manager.h" |
| 78 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 79 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
| 79 #include "chrome/browser/ui/ash/stub_user_accounts_delegate.h" | 80 #include "chrome/browser/ui/ash/stub_user_accounts_delegate.h" |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 475 |
| 475 void SystemTrayDelegateChromeOS::ShowDateSettings() { | 476 void SystemTrayDelegateChromeOS::ShowDateSettings() { |
| 476 content::RecordAction(base::UserMetricsAction("ShowDateOptions")); | 477 content::RecordAction(base::UserMetricsAction("ShowDateOptions")); |
| 477 std::string sub_page = | 478 std::string sub_page = |
| 478 std::string(chrome::kSearchSubPage) + "#" + | 479 std::string(chrome::kSearchSubPage) + "#" + |
| 479 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); | 480 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); |
| 480 // Everybody can change the time zone (even though it is a device setting). | 481 // Everybody can change the time zone (even though it is a device setting). |
| 481 ShowSettingsSubPageForActiveUser(sub_page); | 482 ShowSettingsSubPageForActiveUser(sub_page); |
| 482 } | 483 } |
| 483 | 484 |
| 485 void SystemTrayDelegateChromeOS::ShowSetTimeDialog() { |
| 486 content::RecordAction(base::UserMetricsAction("ShowSetTimeDialog")); |
| 487 SetTimeDialog::ShowDialog(GetNativeWindow()); |
| 488 } |
| 489 |
| 484 void SystemTrayDelegateChromeOS::ShowNetworkSettings( | 490 void SystemTrayDelegateChromeOS::ShowNetworkSettings( |
| 485 const std::string& service_path) { | 491 const std::string& service_path) { |
| 486 if (!LoginState::Get()->IsUserLoggedIn()) | 492 if (!LoginState::Get()->IsUserLoggedIn()) |
| 487 return; | 493 return; |
| 488 ShowNetworkSettingsPage(service_path); | 494 ShowNetworkSettingsPage(service_path); |
| 489 } | 495 } |
| 490 | 496 |
| 491 void SystemTrayDelegateChromeOS::ShowBluetoothSettings() { | 497 void SystemTrayDelegateChromeOS::ShowBluetoothSettings() { |
| 492 // TODO(sad): Make this work. | 498 // TODO(sad): Make this work. |
| 493 } | 499 } |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 accessibility_subscription_.reset(); | 1417 accessibility_subscription_.reset(); |
| 1412 else | 1418 else |
| 1413 OnAccessibilityModeChanged(details.notify); | 1419 OnAccessibilityModeChanged(details.notify); |
| 1414 } | 1420 } |
| 1415 | 1421 |
| 1416 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1422 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1417 return new SystemTrayDelegateChromeOS(); | 1423 return new SystemTrayDelegateChromeOS(); |
| 1418 } | 1424 } |
| 1419 | 1425 |
| 1420 } // namespace chromeos | 1426 } // namespace chromeos |
| OLD | NEW |