summaryrefslogtreecommitdiffstats
path: root/views/controls
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/controls
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/controls')
-rw-r--r--views/controls/scrollbar/base_scroll_bar.cc16
-rw-r--r--views/controls/scrollbar/base_scroll_bar_button.cc7
-rw-r--r--views/controls/scrollbar/bitmap_scroll_bar.cc19
3 files changed, 25 insertions, 17 deletions
diff --git a/views/controls/scrollbar/base_scroll_bar.cc b/views/controls/scrollbar/base_scroll_bar.cc
index 59fcf32..9641cbe 100644
--- a/views/controls/scrollbar/base_scroll_bar.cc
+++ b/views/controls/scrollbar/base_scroll_bar.cc
@@ -4,25 +4,28 @@
#include "views/controls/scrollbar/base_scroll_bar.h"
-#if defined(OS_LINUX)
-#include "ui/gfx/screen.h"
-#endif
-
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/string16.h"
#include "base/utf_string_conversions.h"
+#include "build/build_config.h"
#include "grit/ui_strings.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/canvas.h"
#include "views/controls/menu/menu_item_view.h"
#include "views/controls/menu/menu_runner.h"
-#include "views/controls/scrollbar/base_scroll_bar_thumb.h"
#include "views/controls/scroll_view.h"
+#include "views/controls/scrollbar/base_scroll_bar_thumb.h"
#include "views/widget/widget.h"
+#if defined(OS_LINUX)
+#include "ui/gfx/screen.h"
+#endif
+
#undef min
#undef max
@@ -39,8 +42,7 @@ BaseScrollBar::BaseScrollBar(bool horizontal, BaseScrollBarThumb* thumb)
thumb_track_state_(CustomButton::BS_NORMAL),
last_scroll_amount_(SCROLL_NONE),
ALLOW_THIS_IN_INITIALIZER_LIST(repeater_(
- NewCallback<BaseScrollBar>(this,
- &BaseScrollBar::TrackClicked))),
+ base::Bind(&BaseScrollBar::TrackClicked, base::Unretained(this)))),
context_menu_mouse_position_(0) {
AddChildView(thumb_);
diff --git a/views/controls/scrollbar/base_scroll_bar_button.cc b/views/controls/scrollbar/base_scroll_bar_button.cc
index 14f086b..d30358e 100644
--- a/views/controls/scrollbar/base_scroll_bar_button.cc
+++ b/views/controls/scrollbar/base_scroll_bar_button.cc
@@ -4,13 +4,16 @@
#include "views/controls/scrollbar/base_scroll_bar_button.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
+
namespace views {
BaseScrollBarButton::BaseScrollBarButton(ButtonListener* listener)
: CustomButton(listener),
ALLOW_THIS_IN_INITIALIZER_LIST(repeater_(
- NewCallback<BaseScrollBarButton>(this,
- &BaseScrollBarButton::RepeaterNotifyClick))) {
+ base::Bind(&BaseScrollBarButton::RepeaterNotifyClick,
+ base::Unretained(this)))) {
}
BaseScrollBarButton::~BaseScrollBarButton() {
diff --git a/views/controls/scrollbar/bitmap_scroll_bar.cc b/views/controls/scrollbar/bitmap_scroll_bar.cc
index 6350799..7529f99 100644
--- a/views/controls/scrollbar/bitmap_scroll_bar.cc
+++ b/views/controls/scrollbar/bitmap_scroll_bar.cc
@@ -4,25 +4,28 @@
#include "views/controls/scrollbar/bitmap_scroll_bar.h"
-#if defined(OS_LINUX)
-#include "views/screen.h"
-#endif
-
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/string16.h"
#include "base/utf_string_conversions.h"
+#include "build/build_config.h"
#include "grit/ui_strings.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/canvas.h"
#include "views/controls/menu/menu.h"
-#include "views/controls/scrollbar/base_scroll_bar_thumb.h"
#include "views/controls/scroll_view.h"
+#include "views/controls/scrollbar/base_scroll_bar_thumb.h"
#include "views/widget/widget.h"
+#if defined(OS_LINUX)
+#include "views/screen.h"
+#endif
+
#undef min
#undef max
@@ -32,7 +35,7 @@ namespace {
// The distance the mouse can be dragged outside the bounds of the thumb during
// dragging before the scrollbar will snap back to its regular position.
-static const int kScrollThumbDragOutSnap = 100;
+const int kScrollThumbDragOutSnap = 100;
///////////////////////////////////////////////////////////////////////////////
//
@@ -48,8 +51,8 @@ class AutorepeatButton : public ImageButton {
explicit AutorepeatButton(ButtonListener* listener)
: ImageButton(listener),
ALLOW_THIS_IN_INITIALIZER_LIST(repeater_(
- NewCallback<AutorepeatButton>(this,
- &AutorepeatButton::NotifyClick))) {
+ base::Bind(&AutorepeatButton::NotifyClick,
+ base::Unretained(this)))) {
}
virtual ~AutorepeatButton() {}