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

Side by Side Diff: ui/views/repeat_controller.h

Issue 2192443003: MacViews: Fix scrolling when clicking on the views::ScrollView scroll track (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: static const Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « ui/views/controls/scrollbar/native_scroll_bar.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_REPEAT_CONTROLLER_H_ 5 #ifndef UI_VIEWS_REPEAT_CONTROLLER_H_
6 #define UI_VIEWS_REPEAT_CONTROLLER_H_ 6 #define UI_VIEWS_REPEAT_CONTROLLER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 15 matching lines...) Expand all
26 // The RepeatController takes ownership of this callback object. 26 // The RepeatController takes ownership of this callback object.
27 explicit RepeatController(const base::Closure& callback); 27 explicit RepeatController(const base::Closure& callback);
28 virtual ~RepeatController(); 28 virtual ~RepeatController();
29 29
30 // Start repeating. 30 // Start repeating.
31 void Start(); 31 void Start();
32 32
33 // Stop repeating. 33 // Stop repeating.
34 void Stop(); 34 void Stop();
35 35
36 const base::OneShotTimer& timer_for_testing() const { return timer_; }
37
36 private: 38 private:
37 // Called when the timer expires. 39 // Called when the timer expires.
38 void Run(); 40 void Run();
39 41
40 // The current timer. 42 // The current timer.
41 base::OneShotTimer timer_; 43 base::OneShotTimer timer_;
42 44
43 base::Closure callback_; 45 base::Closure callback_;
44 46
45 DISALLOW_COPY_AND_ASSIGN(RepeatController); 47 DISALLOW_COPY_AND_ASSIGN(RepeatController);
46 }; 48 };
47 49
48 } // namespace views 50 } // namespace views
49 51
50 #endif // UI_VIEWS_REPEAT_CONTROLLER_H_ 52 #endif // UI_VIEWS_REPEAT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/scrollbar/native_scroll_bar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698