summaryrefslogtreecommitdiffstats
path: root/views/repeat_controller.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-04 22:40:50 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-04 22:40:50 +0000
commit0fd722c3620bbfc2d24f8168ab3167fd14ec93eb (patch)
tree5548d075b67d422bf972a8001ae27317f42fc2f2 /views/repeat_controller.cc
parent980a50c7853059caf68b475ae8637dc35f199f82 (diff)
downloadchromium_src-0fd722c3620bbfc2d24f8168ab3167fd14ec93eb.zip
chromium_src-0fd722c3620bbfc2d24f8168ab3167fd14ec93eb.tar.gz
chromium_src-0fd722c3620bbfc2d24f8168ab3167fd14ec93eb.tar.bz2
views: Migrate RepeatController to base::Closure.
R=sky@chromium.org,ajwong@chromium.org Review URL: http://codereview.chromium.org/8136009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104003 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/repeat_controller.cc')
-rw-r--r--views/repeat_controller.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/views/repeat_controller.cc b/views/repeat_controller.cc
index 37e0892..416b591 100644
--- a/views/repeat_controller.cc
+++ b/views/repeat_controller.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,13 +10,13 @@ namespace views {
// The delay before the first and then subsequent repeats. Values taken from
// XUL code: http://mxr.mozilla.org/seamonkey/source/layout/xul/base/src/nsRepeatService.cpp#52
-static const int kInitialRepeatDelay = 250;
-static const int kRepeatDelay = 50;
+const int kInitialRepeatDelay = 250;
+const int kRepeatDelay = 50;
///////////////////////////////////////////////////////////////////////////////
// RepeatController, public:
-RepeatController::RepeatController(RepeatCallback* callback)
+RepeatController::RepeatController(const base::Closure& callback)
: callback_(callback) {
}
@@ -39,7 +39,7 @@ void RepeatController::Stop() {
void RepeatController::Run() {
timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(kRepeatDelay), this,
&RepeatController::Run);
- callback_->Run();
+ callback_.Run();
}
} // namespace views