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

Unified Diff: ash/common/system/date/date_view.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: 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..6a2eef4dcf517874851c89f4d9376c84ab4d09a3 100644
--- a/ash/common/system/date/date_view.cc
+++ b/ash/common/system/date/date_view.cc
@@ -4,7 +4,7 @@
#include "ash/common/system/date/date_view.h"
-#include "ash/common/system/tray/system_tray_delegate.h"
+#include "ash/common/system/tray/system_tray_controller.h"
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_utils.h"
#include "ash/common/wm_shell.h"
@@ -91,7 +91,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 +164,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,9 +188,10 @@ 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();
- else if (action_ == TrayDate::SET_SYSTEM_TIME)
- WmShell::Get()->system_tray_delegate()->ShowSetTimeDialog();
+ WmShell::Get()->system_tray_controller()->ShowDateSettings();
+ // HACK - would port ShowSetTimeDialog also
+ // else if (action_ == TrayDate::SET_SYSTEM_TIME)
+ // WmShell::Get()->system_tray_delegate()->ShowSetTimeDialog();
else
return false;
CloseSystemBubble();
@@ -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