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

Unified Diff: ash/common/system/date/date_view.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: ash/common/system/date/date_view.cc
diff --git a/ash/common/system/date/date_view.cc b/ash/common/system/date/date_view.cc
index 716a61fea402fb205d3b736313df776cada84e19..d89e231635d9818f00c5d4a93034d49f8e2b9e5b 100644
--- a/ash/common/system/date/date_view.cc
+++ b/ash/common/system/date/date_view.cc
@@ -4,6 +4,7 @@
#include "ash/common/system/date/date_view.h"
+#include "ash/common/system/tray/system_tray_controller.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_utils.h"
@@ -91,7 +92,7 @@ void BaseDateTimeView::GetAccessibleState(ui::AXViewState* state) {
BaseDateTimeView::BaseDateTimeView(SystemTrayItem* owner)
: ActionableView(owner),
- hour_type_(WmShell::Get()->system_tray_delegate()->GetHourClockType()) {
+ hour_type_(WmShell::Get()->system_tray_controller()->GetHourClockType()) {
SetTimer(base::Time::Now());
SetFocusBehavior(FocusBehavior::NEVER);
}
@@ -164,7 +165,7 @@ void DateView::SetAction(TrayDate::DateAction action) {
}
void DateView::UpdateTimeFormat() {
- hour_type_ = WmShell::Get()->system_tray_delegate()->GetHourClockType();
+ hour_type_ = WmShell::Get()->system_tray_controller()->GetHourClockType();
UpdateText();
}
@@ -188,7 +189,7 @@ bool DateView::PerformAction(const ui::Event& event) {
if (action_ == TrayDate::NONE)
return false;
if (action_ == TrayDate::SHOW_DATE_SETTINGS)
- WmShell::Get()->system_tray_delegate()->ShowDateSettings();
+ WmShell::Get()->system_tray_controller()->ShowDateSettings();
else if (action_ == TrayDate::SET_SYSTEM_TIME)
WmShell::Get()->system_tray_delegate()->ShowSetTimeDialog();
James Cook 2016/09/30 21:18:26 msw, this and many other system_tray_delegate()->S
msw 2016/09/30 23:26:48 Acknowledged.
else
@@ -231,7 +232,7 @@ TimeView::TimeView(TrayDate::ClockLayout clock_layout)
TimeView::~TimeView() {}
void TimeView::UpdateTimeFormat() {
- hour_type_ = WmShell::Get()->system_tray_delegate()->GetHourClockType();
+ hour_type_ = WmShell::Get()->system_tray_controller()->GetHourClockType();
UpdateText();
}

Powered by Google App Engine
This is Rietveld 408576698