Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: ui/views/controls/scrollbar/base_scroll_bar.h

Issue 10828265: Replace views::LocatedEvent with ui::LocatedEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // Wrapper functions that calls the controller. We need this since native 92 // Wrapper functions that calls the controller. We need this since native
93 // scrollbars wrap around a different scrollbar. When calling the controller 93 // scrollbars wrap around a different scrollbar. When calling the controller
94 // we need to pass in the appropriate scrollbar. For normal scrollbars it's 94 // we need to pass in the appropriate scrollbar. For normal scrollbars it's
95 // the |this| scrollbar, for native scrollbars it's the native scrollbar used 95 // the |this| scrollbar, for native scrollbars it's the native scrollbar used
96 // to create this. 96 // to create this.
97 virtual void ScrollToPosition(int position); 97 virtual void ScrollToPosition(int position);
98 virtual int GetScrollIncrement(bool is_page, bool is_positive); 98 virtual int GetScrollIncrement(bool is_page, bool is_positive);
99 99
100 private: 100 private:
101 // Changes to 'pushed' state and starts a timer to scroll repeatedly. 101 // Changes to 'pushed' state and starts a timer to scroll repeatedly.
102 void ProcessPressEvent(const LocatedEvent& event); 102 void ProcessPressEvent(const ui::LocatedEvent& event);
103 103
104 // Resets state to 'normal' and stops the repeater. 104 // Resets state to 'normal' and stops the repeater.
105 void ResetState(); 105 void ResetState();
106 106
107 // Called when the mouse is pressed down in the track area. 107 // Called when the mouse is pressed down in the track area.
108 void TrackClicked(); 108 void TrackClicked();
109 109
110 // Responsible for scrolling the contents and also updating the UI to the 110 // Responsible for scrolling the contents and also updating the UI to the
111 // current value of the Scroll Offset. 111 // current value of the Scroll Offset.
112 void ScrollContentsToOffset(); 112 void ScrollContentsToOffset();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_controller.cc ('k') | ui/views/controls/scrollbar/base_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698