diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-01 16:09:33 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-01 16:09:33 +0000 |
commit | 45647af87d1e7e5ed607c6fd82a1ac32a708a725 (patch) | |
tree | 258381d5b333c5749616d97c1fe3a6bc4db50e1d /views/repeat_controller.cc | |
parent | ab91de22a8a7eef73958b0b4463de89bd7fdbd12 (diff) | |
download | chromium_src-45647af87d1e7e5ed607c6fd82a1ac32a708a725.zip chromium_src-45647af87d1e7e5ed607c6fd82a1ac32a708a725.tar.gz chromium_src-45647af87d1e7e5ed607c6fd82a1ac32a708a725.tar.bz2 |
views: Move the remaining file from views/ to ui/views/.
BUG=104039
R=ben@chromium.org
TBR=stevenjb@chromium.org
Review URL: http://codereview.chromium.org/8771006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112469 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/repeat_controller.cc')
-rw-r--r-- | views/repeat_controller.cc | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/views/repeat_controller.cc b/views/repeat_controller.cc deleted file mode 100644 index 416b591..0000000 --- a/views/repeat_controller.cc +++ /dev/null @@ -1,45 +0,0 @@ -// 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. - -#include "views/repeat_controller.h" - -using base::TimeDelta; - -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 -const int kInitialRepeatDelay = 250; -const int kRepeatDelay = 50; - -/////////////////////////////////////////////////////////////////////////////// -// RepeatController, public: - -RepeatController::RepeatController(const base::Closure& callback) - : callback_(callback) { -} - -RepeatController::~RepeatController() { -} - -void RepeatController::Start() { - // The first timer is slightly longer than subsequent repeats. - timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(kInitialRepeatDelay), - this, &RepeatController::Run); -} - -void RepeatController::Stop() { - timer_.Stop(); -} - -/////////////////////////////////////////////////////////////////////////////// -// RepeatController, private: - -void RepeatController::Run() { - timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(kRepeatDelay), this, - &RepeatController::Run); - callback_.Run(); -} - -} // namespace views |