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

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: cleanup 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 a78cad3166ccac5514271bb79753e08915d87304..b4d54baececf199fcc7acbe500fdd5b6053b522a 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -236,9 +236,7 @@ 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());
+ // TODO: how to send initial values?
device::BluetoothAdapterFactory::GetAdapter(
base::Bind(&SystemTrayDelegateChromeOS::InitializeOnAdapterReady,
@@ -293,7 +291,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 +400,6 @@ void SystemTrayDelegateChromeOS::GetSystemUpdateInfo(
GetUpdateInfo(UpgradeDetector::GetInstance(), info);
}
-base::HourClockType SystemTrayDelegateChromeOS::GetHourClockType() const {
- return clock_type_;
-}
-
void SystemTrayDelegateChromeOS::ShowSettings() {
SystemTrayCommon::ShowSettings();
}
@@ -417,10 +410,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());
@@ -927,13 +916,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