| 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 "ui/views/context_menu_controller.h" | 8 #include "ui/views/context_menu_controller.h" |
| 9 #include "ui/views/controls/button/image_button.h" | 9 #include "ui/views/controls/button/image_button.h" |
| 10 #include "ui/views/controls/menu/menu_delegate.h" | 10 #include "ui/views/controls/menu/menu_delegate.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 // Scroll the contents by the specified offset (contents coordinates). | 55 // Scroll the contents by the specified offset (contents coordinates). |
| 56 void ScrollByContentsOffset(int contents_offset); | 56 void ScrollByContentsOffset(int contents_offset); |
| 57 | 57 |
| 58 // View overrides: | 58 // View overrides: |
| 59 virtual gfx::Size GetPreferredSize() OVERRIDE = 0; | 59 virtual gfx::Size GetPreferredSize() OVERRIDE = 0; |
| 60 virtual void Layout() OVERRIDE = 0; | 60 virtual void Layout() OVERRIDE = 0; |
| 61 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 61 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
| 62 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; | 62 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
| 63 virtual void OnMouseCaptureLost() OVERRIDE; | 63 virtual void OnMouseCaptureLost() OVERRIDE; |
| 64 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; | 64 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
| 65 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE; | 65 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE; |
| 66 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; | 66 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; |
| 67 | 67 |
| 68 // ScrollBar overrides: | 68 // ScrollBar overrides: |
| 69 virtual void Update(int viewport_size, | 69 virtual void Update(int viewport_size, |
| 70 int content_size, | 70 int content_size, |
| 71 int contents_scroll_offset) OVERRIDE; | 71 int contents_scroll_offset) OVERRIDE; |
| 72 virtual int GetLayoutSize() const OVERRIDE = 0; | 72 virtual int GetLayoutSize() const OVERRIDE = 0; |
| 73 virtual int GetPosition() const OVERRIDE; | 73 virtual int GetPosition() const OVERRIDE; |
| 74 | 74 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 int context_menu_mouse_position_; | 155 int context_menu_mouse_position_; |
| 156 | 156 |
| 157 scoped_ptr<MenuRunner> menu_runner_; | 157 scoped_ptr<MenuRunner> menu_runner_; |
| 158 | 158 |
| 159 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); | 159 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 } // namespace views | 162 } // namespace views |
| 163 | 163 |
| 164 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ | 164 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ |
| OLD | NEW |