summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-02 18:23:02 +0000
committerjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-02 18:23:02 +0000
commitd323a176fa8c2ef474ce41dd8a1cddacb4fc67ff (patch)
tree5a6b91bcea70978cbf9b63000ed5f798d532f9b7 /views
parentb1bb86d4d58f736fb980b8611ccf43d79e7b5b2b (diff)
downloadchromium_src-d323a176fa8c2ef474ce41dd8a1cddacb4fc67ff.zip
chromium_src-d323a176fa8c2ef474ce41dd8a1cddacb4fc67ff.tar.gz
chromium_src-d323a176fa8c2ef474ce41dd8a1cddacb4fc67ff.tar.bz2
Update base/timer.h code to pass through Location from call sites. (reland) original CL w/LGTMs: http://codereview.chromium.org/7812036/
Review URL: http://codereview.chromium.org/7824041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/menu/menu_controller.cc10
-rw-r--r--views/controls/throbber.cc10
-rw-r--r--views/repeat_controller.cc6
-rw-r--r--views/touchui/touch_factory.cc3
-rw-r--r--views/touchui/touch_selection_controller_impl.cc2
-rw-r--r--views/widget/tooltip_manager_views.cc3
6 files changed, 20 insertions, 14 deletions
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc
index 1858993..acad114 100644
--- a/views/controls/menu/menu_controller.cc
+++ b/views/controls/menu/menu_controller.cc
@@ -168,8 +168,9 @@ class MenuController::MenuScrollTask {
is_scrolling_up_ = new_is_up;
if (!scrolling_timer_.IsRunning()) {
- scrolling_timer_.Start(TimeDelta::FromMilliseconds(kScrollTimerMS), this,
- &MenuScrollTask::Run);
+ scrolling_timer_.Start(FROM_HERE,
+ TimeDelta::FromMilliseconds(kScrollTimerMS),
+ this, &MenuScrollTask::Run);
}
}
@@ -1437,7 +1438,7 @@ void MenuController::BuildMenuItemPath(MenuItemView* item,
}
void MenuController::StartShowTimer() {
- show_timer_.Start(TimeDelta::FromMilliseconds(kShowDelay), this,
+ show_timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(kShowDelay), this,
&MenuController::CommitPendingSelection);
}
@@ -1446,7 +1447,8 @@ void MenuController::StopShowTimer() {
}
void MenuController::StartCancelAllTimer() {
- cancel_all_timer_.Start(TimeDelta::FromMilliseconds(kCloseOnExitTime),
+ cancel_all_timer_.Start(FROM_HERE,
+ TimeDelta::FromMilliseconds(kCloseOnExitTime),
this, &MenuController::CancelAll);
}
diff --git a/views/controls/throbber.cc b/views/controls/throbber.cc
index 34f20a8..741b0a6 100644
--- a/views/controls/throbber.cc
+++ b/views/controls/throbber.cc
@@ -34,7 +34,7 @@ void Throbber::Start() {
start_time_ = Time::Now();
- timer_.Start(frame_time_ - TimeDelta::FromMilliseconds(10),
+ timer_.Start(FROM_HERE, frame_time_ - TimeDelta::FromMilliseconds(10),
this, &Throbber::Run);
running_ = true;
@@ -110,8 +110,8 @@ void SmoothedThrobber::Start() {
stop_timer_.Stop();
if (!running_ && !start_timer_.IsRunning()) {
- start_timer_.Start(TimeDelta::FromMilliseconds(start_delay_ms_), this,
- &SmoothedThrobber::StartDelayOver);
+ start_timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(start_delay_ms_),
+ this, &SmoothedThrobber::StartDelayOver);
}
}
@@ -124,8 +124,8 @@ void SmoothedThrobber::Stop() {
start_timer_.Stop();
stop_timer_.Stop();
- stop_timer_.Start(TimeDelta::FromMilliseconds(stop_delay_ms_), this,
- &SmoothedThrobber::StopDelayOver);
+ stop_timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(stop_delay_ms_),
+ this, &SmoothedThrobber::StopDelayOver);
}
void SmoothedThrobber::StopDelayOver() {
diff --git a/views/repeat_controller.cc b/views/repeat_controller.cc
index bb70852..37e0892 100644
--- a/views/repeat_controller.cc
+++ b/views/repeat_controller.cc
@@ -25,8 +25,8 @@ RepeatController::~RepeatController() {
void RepeatController::Start() {
// The first timer is slightly longer than subsequent repeats.
- timer_.Start(TimeDelta::FromMilliseconds(kInitialRepeatDelay), this,
- &RepeatController::Run);
+ timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(kInitialRepeatDelay),
+ this, &RepeatController::Run);
}
void RepeatController::Stop() {
@@ -37,7 +37,7 @@ void RepeatController::Stop() {
// RepeatController, private:
void RepeatController::Run() {
- timer_.Start(TimeDelta::FromMilliseconds(kRepeatDelay), this,
+ timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(kRepeatDelay), this,
&RepeatController::Run);
callback_->Run();
}
diff --git a/views/touchui/touch_factory.cc b/views/touchui/touch_factory.cc
index 6580228..81dd41d 100644
--- a/views/touchui/touch_factory.cc
+++ b/views/touchui/touch_factory.cc
@@ -351,7 +351,8 @@ void TouchFactory::SetCursorVisible(bool show, bool start_timer) {
// The cursor is going to be shown. Reset the timer for hiding it.
if (show && start_timer) {
cursor_timer_.Stop();
- cursor_timer_.Start(base::TimeDelta::FromSeconds(kCursorIdleSeconds),
+ cursor_timer_.Start(
+ FROM_HERE, base::TimeDelta::FromSeconds(kCursorIdleSeconds),
this, &TouchFactory::HideCursorForInactivity);
} else {
cursor_timer_.Stop();
diff --git a/views/touchui/touch_selection_controller_impl.cc b/views/touchui/touch_selection_controller_impl.cc
index eff3be6..a34b6be 100644
--- a/views/touchui/touch_selection_controller_impl.cc
+++ b/views/touchui/touch_selection_controller_impl.cc
@@ -311,6 +311,7 @@ void TouchSelectionControllerImpl::SelectionHandleDragged(
// We do not want to show the context menu while dragging.
HideContextMenu();
context_menu_timer_.Start(
+ FROM_HERE,
base::TimeDelta::FromMilliseconds(kContextMenuTimoutMs),
this,
&TouchSelectionControllerImpl::ContextMenuTimerFired);
@@ -387,6 +388,7 @@ void TouchSelectionControllerImpl::UpdateContextMenu(const gfx::Point& p1,
// If there is selection, we restart the context menu timer.
if (p1 != p2) {
context_menu_timer_.Start(
+ FROM_HERE,
base::TimeDelta::FromMilliseconds(kContextMenuTimoutMs),
this,
&TouchSelectionControllerImpl::ContextMenuTimerFired);
diff --git a/views/widget/tooltip_manager_views.cc b/views/widget/tooltip_manager_views.cc
index b952b09..d0d2a86 100644
--- a/views/widget/tooltip_manager_views.cc
+++ b/views/widget/tooltip_manager_views.cc
@@ -77,7 +77,8 @@ TooltipManagerViews::TooltipManagerViews(internal::RootView* root_view)
tooltip_widget_->SetContentsView(&tooltip_label_);
tooltip_widget_->Activate();
tooltip_widget_->SetAlwaysOnTop(true);
- tooltip_timer_.Start(base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs),
+ tooltip_timer_.Start(FROM_HERE,
+ base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs),
this, &TooltipManagerViews::TooltipTimerFired);
MessageLoopForUI::current()->AddObserver(this);
}