OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ui/views/controls/scrollbar/bitmap_scroll_bar.h" | 5 #include "ui/views/controls/scrollbar/bitmap_scroll_bar.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 // Paint the track. | 292 // Paint the track. |
293 gfx::Rect track_bounds = GetTrackBounds(); | 293 gfx::Rect track_bounds = GetTrackBounds(); |
294 canvas->TileImageInt(*images_[THUMB_TRACK][GetThumbTrackState()], | 294 canvas->TileImageInt(*images_[THUMB_TRACK][GetThumbTrackState()], |
295 track_bounds.x(), track_bounds.y(), | 295 track_bounds.x(), track_bounds.y(), |
296 track_bounds.width(), track_bounds.height()); | 296 track_bounds.width(), track_bounds.height()); |
297 } | 297 } |
298 | 298 |
299 /////////////////////////////////////////////////////////////////////////////// | 299 /////////////////////////////////////////////////////////////////////////////// |
300 // BitmapScrollBar, ButtonListener implementation: | 300 // BitmapScrollBar, ButtonListener implementation: |
301 | 301 |
302 void BitmapScrollBar::ButtonPressed(Button* sender, const views::Event& event) { | 302 void BitmapScrollBar::ButtonPressed(Button* sender, const ui::Event& event) { |
303 if (sender == prev_button_) { | 303 if (sender == prev_button_) { |
304 ScrollByAmount(SCROLL_PREV_LINE); | 304 ScrollByAmount(SCROLL_PREV_LINE); |
305 } else if (sender == next_button_) { | 305 } else if (sender == next_button_) { |
306 ScrollByAmount(SCROLL_NEXT_LINE); | 306 ScrollByAmount(SCROLL_NEXT_LINE); |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
310 } // namespace views | 310 } // namespace views |
OLD | NEW |