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

Unified Diff: ash/system/date/date_view.cc

Issue 2058173002: mash: Move SystemTrayDelegate ownership to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback Created 4 years, 6 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: ash/system/date/date_view.cc
diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc
index 85a5e610a0532e86ab8b573e0d63a67a73baaded..e805643608bad34dc7b0609fa10ea6dc5e3f193c 100644
--- a/ash/system/date/date_view.cc
+++ b/ash/system/date/date_view.cc
@@ -6,7 +6,7 @@
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
-#include "ash/shell.h"
+#include "ash/common/wm_shell.h"
#include "ash/system/tray/tray_utils.h"
#include "base/command_line.h"
#include "base/i18n/rtl.h"
@@ -99,9 +99,7 @@ void BaseDateTimeView::GetAccessibleState(ui::AXViewState* state) {
}
BaseDateTimeView::BaseDateTimeView()
- : hour_type_(ash::Shell::GetInstance()
- ->system_tray_delegate()
- ->GetHourClockType()) {
+ : hour_type_(WmShell::Get()->system_tray_delegate()->GetHourClockType()) {
SetTimer(base::Time::Now());
SetFocusBehavior(FocusBehavior::NEVER);
}
@@ -174,8 +172,7 @@ void DateView::SetAction(TrayDate::DateAction action) {
}
void DateView::UpdateTimeFormat() {
- hour_type_ =
- ash::Shell::GetInstance()->system_tray_delegate()->GetHourClockType();
+ hour_type_ = WmShell::Get()->system_tray_delegate()->GetHourClockType();
UpdateText();
}
@@ -200,9 +197,9 @@ bool DateView::PerformAction(const ui::Event& event) {
if (action_ == TrayDate::NONE)
return false;
if (action_ == TrayDate::SHOW_DATE_SETTINGS)
- ash::Shell::GetInstance()->system_tray_delegate()->ShowDateSettings();
+ WmShell::Get()->system_tray_delegate()->ShowDateSettings();
else if (action_ == TrayDate::SET_SYSTEM_TIME)
- ash::Shell::GetInstance()->system_tray_delegate()->ShowSetTimeDialog();
+ WmShell::Get()->system_tray_delegate()->ShowSetTimeDialog();
return true;
}
@@ -242,8 +239,7 @@ TimeView::~TimeView() {
}
void TimeView::UpdateTimeFormat() {
- hour_type_ =
- ash::Shell::GetInstance()->system_tray_delegate()->GetHourClockType();
+ hour_type_ = WmShell::Get()->system_tray_delegate()->GetHourClockType();
UpdateText();
}

Powered by Google App Engine
This is Rietveld 408576698