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

Unified Diff: ash/common/system/tray/system_tray_item.cc

Issue 2698213004: Start removing some pre-md constants and related code. (Closed)
Patch Set: actually use the constant Created 3 years, 10 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
« no previous file with comments | « ash/common/system/tray/system_tray_item.h ('k') | ash/common/system/tray/tray_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/system_tray_item.cc
diff --git a/ash/common/system/tray/system_tray_item.cc b/ash/common/system/tray/system_tray_item.cc
index 164a0e419ecc6490163790e075a73de4010549cd..2d34391fd30e4b84173da20bcd5a525f4b9ab7ba 100644
--- a/ash/common/system/tray/system_tray_item.cc
+++ b/ash/common/system/tray/system_tray_item.cc
@@ -42,16 +42,11 @@ void SystemTrayItem::DestroyDetailedView() {}
void SystemTrayItem::DestroyNotificationView() {}
void SystemTrayItem::TransitionDetailedView() {
- const int transition_delay =
- GetTrayConstant(TRAY_POPUP_TRANSITION_TO_DETAILED_DELAY);
- if (transition_delay <= 0) {
- DoTransitionToDetailedView();
- return;
- }
- transition_delay_timer_.reset(new base::OneShotTimer());
- transition_delay_timer_->Start(
- FROM_HERE, base::TimeDelta::FromMilliseconds(transition_delay), this,
- &SystemTrayItem::DoTransitionToDetailedView);
+ transition_delay_timer_.Start(
+ FROM_HERE,
+ base::TimeDelta::FromMilliseconds(kTrayDetailedViewTransitionDelayMs),
+ base::Bind(&SystemTray::ShowDetailedView, base::Unretained(system_tray()),
+ this, 0, true, BUBBLE_USE_EXISTING));
}
void SystemTrayItem::UpdateAfterLoginStatusChange(LoginStatus status) {}
@@ -84,9 +79,4 @@ bool SystemTrayItem::ShouldShowShelf() const {
return true;
}
-void SystemTrayItem::DoTransitionToDetailedView() {
- transition_delay_timer_.reset();
- system_tray()->ShowDetailedView(this, 0, true, BUBBLE_USE_EXISTING);
-}
-
} // namespace ash
« no previous file with comments | « ash/common/system/tray/system_tray_item.h ('k') | ash/common/system/tray/tray_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698