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/native_scroll_bar_views.h" | 5 #include "ui/views/controls/scrollbar/native_scroll_bar_views.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/base/keycodes/keyboard_codes.h" | 8 #include "ui/base/keycodes/keyboard_codes.h" |
9 #include "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
10 #include "ui/gfx/path.h" | 10 #include "ui/gfx/path.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 int NativeScrollBarViews::GetScrollIncrement(bool is_page, bool is_positive) { | 321 int NativeScrollBarViews::GetScrollIncrement(bool is_page, bool is_positive) { |
322 return controller()->GetScrollIncrement(native_scroll_bar_, | 322 return controller()->GetScrollIncrement(native_scroll_bar_, |
323 is_page, | 323 is_page, |
324 is_positive); | 324 is_positive); |
325 } | 325 } |
326 | 326 |
327 ////////////////////////////////////////////////////////////////////////////// | 327 ////////////////////////////////////////////////////////////////////////////// |
328 // BaseButton::ButtonListener overrides: | 328 // BaseButton::ButtonListener overrides: |
329 | 329 |
330 void NativeScrollBarViews::ButtonPressed(Button* sender, | 330 void NativeScrollBarViews::ButtonPressed(Button* sender, |
331 const views::Event& event) { | 331 const ui::Event& event) { |
332 if (sender == prev_button_) { | 332 if (sender == prev_button_) { |
333 ScrollByAmount(SCROLL_PREV_LINE); | 333 ScrollByAmount(SCROLL_PREV_LINE); |
334 } else if (sender == next_button_) { | 334 } else if (sender == next_button_) { |
335 ScrollByAmount(SCROLL_NEXT_LINE); | 335 ScrollByAmount(SCROLL_NEXT_LINE); |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 //////////////////////////////////////////////////////////////////////////////// | 339 //////////////////////////////////////////////////////////////////////////////// |
340 // NativeScrollBarViews, NativeScrollBarWrapper overrides: | 340 // NativeScrollBarViews, NativeScrollBarWrapper overrides: |
341 | 341 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 gfx::Size track_size = native_theme->GetPartSize( | 421 gfx::Size track_size = native_theme->GetPartSize( |
422 ui::NativeTheme::kScrollbarVerticalThumb, | 422 ui::NativeTheme::kScrollbarVerticalThumb, |
423 ui::NativeTheme::kNormal, | 423 ui::NativeTheme::kNormal, |
424 thumb_params); | 424 thumb_params); |
425 | 425 |
426 return std::max(track_size.width(), button_size.width()); | 426 return std::max(track_size.width(), button_size.width()); |
427 } | 427 } |
428 #endif | 428 #endif |
429 | 429 |
430 } // namespace views | 430 } // namespace views |
OLD | NEW |