summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-02 01:38:59 +0000
committerjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-02 01:38:59 +0000
commit400d323d53525a13fbfc47efa8a95c4b13cbccb9 (patch)
treef647ecce497271c180d9e62d88a4fcfb73328dc9 /views
parent95d9e253aeb47ef0004edc29c9a8c442106b9488 (diff)
downloadchromium_src-400d323d53525a13fbfc47efa8a95c4b13cbccb9.zip
chromium_src-400d323d53525a13fbfc47efa8a95c4b13cbccb9.tar.gz
chromium_src-400d323d53525a13fbfc47efa8a95c4b13cbccb9.tar.bz2
Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, so the original code that created the delayed callback is lost.
This change adds a tracked_objects::Location parameter to the APIs in base/timer.h so we can trace the PostTask callbacks. The other files are touched to add the FROM_HERE Location parameter. Review URL: http://codereview.chromium.org/7812036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99284 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
4 files changed, 16 insertions, 13 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();