| OLD | NEW |
| 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/views/context_menu_controller.h" | 9 #include "ui/views/context_menu_controller.h" |
| 10 #include "ui/views/controls/button/image_button.h" | 10 #include "ui/views/controls/button/image_button.h" |
| 11 #include "ui/views/controls/menu/menu_delegate.h" | 11 #include "ui/views/controls/menu/menu_delegate.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 75 // ContextMenuController overrides. | 75 // ContextMenuController overrides. |
| 76 virtual void ShowContextMenuForView(View* source, | 76 virtual void ShowContextMenuForView(View* source, |
| 77 const gfx::Point& p, | 77 const gfx::Point& point) OVERRIDE; |
| 78 bool is_mouse_gesture) OVERRIDE; | |
| 79 | 78 |
| 80 // Menu::Delegate overrides: | 79 // Menu::Delegate overrides: |
| 81 virtual string16 GetLabel(int id) const OVERRIDE; | 80 virtual string16 GetLabel(int id) const OVERRIDE; |
| 82 virtual bool IsCommandEnabled(int id) const OVERRIDE; | 81 virtual bool IsCommandEnabled(int id) const OVERRIDE; |
| 83 virtual void ExecuteCommand(int id) OVERRIDE; | 82 virtual void ExecuteCommand(int id) OVERRIDE; |
| 84 | 83 |
| 85 protected: | 84 protected: |
| 86 // View overrides: | 85 // View overrides: |
| 87 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE = 0; | 86 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE = 0; |
| 88 | 87 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 int context_menu_mouse_position_; | 149 int context_menu_mouse_position_; |
| 151 | 150 |
| 152 scoped_ptr<MenuRunner> menu_runner_; | 151 scoped_ptr<MenuRunner> menu_runner_; |
| 153 | 152 |
| 154 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); | 153 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); |
| 155 }; | 154 }; |
| 156 | 155 |
| 157 } // namespace views | 156 } // namespace views |
| 158 | 157 |
| 159 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ | 158 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ |
| OLD | NEW |