| 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 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ |
| 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ | 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/views/animation/scroll_animator.h" | 10 #include "ui/views/animation/scroll_animator.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // Scroll the contents by the specified offset (contents coordinates). | 64 // Scroll the contents by the specified offset (contents coordinates). |
| 65 bool ScrollByContentsOffset(int contents_offset); | 65 bool ScrollByContentsOffset(int contents_offset); |
| 66 | 66 |
| 67 // View overrides: | 67 // View overrides: |
| 68 bool OnMousePressed(const ui::MouseEvent& event) override; | 68 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 69 void OnMouseReleased(const ui::MouseEvent& event) override; | 69 void OnMouseReleased(const ui::MouseEvent& event) override; |
| 70 void OnMouseCaptureLost() override; | 70 void OnMouseCaptureLost() override; |
| 71 bool OnKeyPressed(const ui::KeyEvent& event) override; | 71 bool OnKeyPressed(const ui::KeyEvent& event) override; |
| 72 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; | 72 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; |
| 73 void OnScrollEvent(ui::ScrollEvent* event) override; |
| 73 | 74 |
| 74 // ui::EventHandler overrides: | 75 // ui::EventHandler overrides: |
| 75 void OnGestureEvent(ui::GestureEvent* event) override; | 76 void OnGestureEvent(ui::GestureEvent* event) override; |
| 76 | 77 |
| 77 // ScrollBar overrides: | 78 // ScrollBar overrides: |
| 78 void Update(int viewport_size, | 79 void Update(int viewport_size, |
| 79 int content_size, | 80 int content_size, |
| 80 int contents_scroll_offset) override; | 81 int contents_scroll_offset) override; |
| 81 int GetLayoutSize() const override = 0; | 82 int GetLayoutSize() const override = 0; |
| 82 int GetPosition() const override; | 83 int GetPosition() const override; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // TODO(tdresser): This should be removed when raw pixel scrolling for views | 174 // TODO(tdresser): This should be removed when raw pixel scrolling for views |
| 174 // is enabled. See crbug.com/329354. | 175 // is enabled. See crbug.com/329354. |
| 175 gfx::Vector2dF roundoff_error_; | 176 gfx::Vector2dF roundoff_error_; |
| 176 | 177 |
| 177 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); | 178 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); |
| 178 }; | 179 }; |
| 179 | 180 |
| 180 } // namespace views | 181 } // namespace views |
| 181 | 182 |
| 182 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ | 183 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ |
| OLD | NEW |