Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1014)

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 2381753002: Use mojo SystemTray interfaces for both mash and classic ash (Closed)
Patch Set: Restructure based on feedback Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 46b3cbd86ca8da8d086d9a5853646a6f0e93c291..96681c2f41d117ef9e41f002987062bf4e0a421b 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -236,10 +236,6 @@ void SystemTrayDelegateChromeOS::Initialize() {
input_method::InputMethodManager::Get()->AddImeMenuObserver(this);
ui::ime::InputMethodMenuManager::GetInstance()->AddObserver(this);
- g_browser_process->platform_part()->GetSystemClock()->AddObserver(this);
-
- OnSystemClockChanged(g_browser_process->platform_part()->GetSystemClock());
-
device::BluetoothAdapterFactory::GetAdapter(
base::Bind(&SystemTrayDelegateChromeOS::InitializeOnAdapterReady,
weak_ptr_factory_.GetWeakPtr()));
@@ -293,7 +289,6 @@ SystemTrayDelegateChromeOS::~SystemTrayDelegateChromeOS() {
// Unregister a11y status subscription.
accessibility_subscription_.reset();
- g_browser_process->platform_part()->GetSystemClock()->RemoveObserver(this);
DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
input_method::InputMethodManager::Get()->RemoveObserver(this);
ui::ime::InputMethodMenuManager::GetInstance()->RemoveObserver(this);
@@ -403,10 +398,6 @@ void SystemTrayDelegateChromeOS::GetSystemUpdateInfo(
GetUpdateInfo(UpgradeDetector::GetInstance(), info);
}
-base::HourClockType SystemTrayDelegateChromeOS::GetHourClockType() const {
- return clock_type_;
-}
-
void SystemTrayDelegateChromeOS::ShowSettings() {
SystemTrayCommon::ShowSettings();
}
@@ -417,10 +408,6 @@ bool SystemTrayDelegateChromeOS::ShouldShowSettings() {
!wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
}
-void SystemTrayDelegateChromeOS::ShowDateSettings() {
- SystemTrayCommon::ShowDateSettings();
-}
-
void SystemTrayDelegateChromeOS::ShowSetTimeDialog() {
// TODO(mash): Refactor out GetNativeWindow and move to SystemTrayCommon.
SetTimeDialog::ShowDialog(GetNativeWindow());
@@ -920,13 +907,6 @@ bool SystemTrayDelegateChromeOS::GetShouldUse24HourClockForTesting() const {
->ShouldUse24HourClock();
}
-void SystemTrayDelegateChromeOS::OnSystemClockChanged(
- system::SystemClock* system_clock) {
- const bool use_24_hour_clock = system_clock->ShouldUse24HourClock();
- clock_type_ = use_24_hour_clock ? base::k24HourClock : base::k12HourClock;
- GetSystemTrayNotifier()->NotifyDateFormatChanged();
-}
-
void SystemTrayDelegateChromeOS::UpdateShowLogoutButtonInTray() {
GetSystemTrayNotifier()->NotifyShowLoginButtonChanged(
user_pref_registrar_->prefs()->GetBoolean(

Powered by Google App Engine
This is Rietveld 408576698