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

Unified Diff: chrome/browser/ui/views/status_bubble_views.cc

Issue 10026013: Update use of TimeDelta in chrome/browser/*, ui/views/*, and other places. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 7 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 | « chrome/browser/ui/views/extensions/extension_installed_bubble.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/status_bubble_views.cc
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index 13bce712183b9c76ed4ab038875803aee5b530e1..9d2344862b8fbdcadd68f9146220ef98a538ea01 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -138,10 +138,10 @@ class StatusBubbleViews::StatusView : public views::Label,
class InitialTimer;
// Manage the timers that control the delay before a fade begins or ends.
- void StartTimer(int time);
+ void StartTimer(base::TimeDelta time);
void OnTimer();
void CancelTimer();
- void RestartTimer(int delay);
+ void RestartTimer(base::TimeDelta delay);
// Manage the fades and starting and stopping the animations correctly.
void StartFade(double start, double end, int duration);
@@ -212,7 +212,7 @@ void StatusBubbleViews::StatusView::Hide() {
stage_ = BUBBLE_HIDDEN;
}
-void StatusBubbleViews::StatusView::StartTimer(int time) {
+void StatusBubbleViews::StatusView::StartTimer(base::TimeDelta time) {
if (timer_factory_.HasWeakPtrs())
timer_factory_.InvalidateWeakPtrs();
@@ -238,7 +238,7 @@ void StatusBubbleViews::StatusView::CancelTimer() {
timer_factory_.InvalidateWeakPtrs();
}
-void StatusBubbleViews::StatusView::RestartTimer(int delay) {
+void StatusBubbleViews::StatusView::RestartTimer(base::TimeDelta delay) {
CancelTimer();
StartTimer(delay);
}
@@ -247,7 +247,7 @@ void StatusBubbleViews::StatusView::ResetTimer() {
if (stage_ == BUBBLE_SHOWING_TIMER) {
// We hadn't yet begun showing anything when we received a new request
// for something to show, so we start from scratch.
- RestartTimer(kShowDelay);
+ RestartTimer(base::TimeDelta::FromMilliseconds(kShowDelay));
}
}
@@ -265,7 +265,7 @@ void StatusBubbleViews::StatusView::StartFade(double start,
void StatusBubbleViews::StatusView::StartHiding() {
if (stage_ == BUBBLE_SHOWN) {
stage_ = BUBBLE_HIDING_TIMER;
- StartTimer(kHideDelay);
+ StartTimer(base::TimeDelta::FromMilliseconds(kHideDelay));
} else if (stage_ == BUBBLE_SHOWING_TIMER) {
stage_ = BUBBLE_HIDDEN;
popup_->Hide();
@@ -285,7 +285,7 @@ void StatusBubbleViews::StatusView::StartShowing() {
if (stage_ == BUBBLE_HIDDEN) {
popup_->Show();
stage_ = BUBBLE_SHOWING_TIMER;
- StartTimer(kShowDelay);
+ StartTimer(base::TimeDelta::FromMilliseconds(kShowDelay));
} else if (stage_ == BUBBLE_HIDING_TIMER) {
stage_ = BUBBLE_SHOWN;
CancelTimer();
@@ -679,7 +679,7 @@ void StatusBubbleViews::SetURL(const GURL& url, const std::string& languages) {
FROM_HERE,
base::Bind(&StatusBubbleViews::ExpandBubble,
expand_timer_factory_.GetWeakPtr()),
- kExpandHoverDelay);
+ base::TimeDelta::FromMilliseconds(kExpandHoverDelay));
}
}
}
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_installed_bubble.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698