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

Side by Side Diff: chrome/views/bitmap_scroll_bar.h

Issue 7344: Convert GetPreferredSize from:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_VIEWS_BITMAP_SCROLL_BAR_H__ 5 #ifndef CHROME_VIEWS_BITMAP_SCROLL_BAR_H__
6 #define CHROME_VIEWS_BITMAP_SCROLL_BAR_H__ 6 #define CHROME_VIEWS_BITMAP_SCROLL_BAR_H__
7 7
8 #include "chrome/views/button.h" 8 #include "chrome/views/button.h"
9 #include "chrome/views/menu.h" 9 #include "chrome/views/menu.h"
10 #include "chrome/views/repeat_controller.h" 10 #include "chrome/views/repeat_controller.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Scroll the contents to the appropriate position given the supplied 80 // Scroll the contents to the appropriate position given the supplied
81 // position of the thumb (thumb track coordinates). If |scroll_to_middle| is 81 // position of the thumb (thumb track coordinates). If |scroll_to_middle| is
82 // true, then the conversion assumes |thumb_position| is in the middle of the 82 // true, then the conversion assumes |thumb_position| is in the middle of the
83 // thumb rather than the top. 83 // thumb rather than the top.
84 void ScrollToThumbPosition(int thumb_position, bool scroll_to_middle); 84 void ScrollToThumbPosition(int thumb_position, bool scroll_to_middle);
85 85
86 // Scroll the contents by the specified offset (contents coordinates). 86 // Scroll the contents by the specified offset (contents coordinates).
87 void ScrollByContentsOffset(int contents_offset); 87 void ScrollByContentsOffset(int contents_offset);
88 88
89 // View overrides: 89 // View overrides:
90 virtual void GetPreferredSize(CSize* preferred_size); 90 virtual gfx::Size GetPreferredSize();
91 virtual void Paint(ChromeCanvas* canvas); 91 virtual void Paint(ChromeCanvas* canvas);
92 virtual void Layout(); 92 virtual void Layout();
93 virtual void DidChangeBounds(const CRect& previous, const CRect& current); 93 virtual void DidChangeBounds(const CRect& previous, const CRect& current);
94 virtual bool OnMousePressed(const MouseEvent& event); 94 virtual bool OnMousePressed(const MouseEvent& event);
95 virtual void OnMouseReleased(const MouseEvent& event, bool canceled); 95 virtual void OnMouseReleased(const MouseEvent& event, bool canceled);
96 virtual bool OnMouseWheel(const MouseWheelEvent& event); 96 virtual bool OnMouseWheel(const MouseWheelEvent& event);
97 virtual bool OnKeyPressed(const KeyEvent& event); 97 virtual bool OnKeyPressed(const KeyEvent& event);
98 98
99 // BaseButton::ButtonListener overrides: 99 // BaseButton::ButtonListener overrides:
100 virtual void ButtonPressed(BaseButton* sender); 100 virtual void ButtonPressed(BaseButton* sender);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // True if the scroll buttons at each end of the scroll bar should be shown. 176 // True if the scroll buttons at each end of the scroll bar should be shown.
177 bool show_scroll_buttons_; 177 bool show_scroll_buttons_;
178 178
179 DISALLOW_EVIL_CONSTRUCTORS(BitmapScrollBar); 179 DISALLOW_EVIL_CONSTRUCTORS(BitmapScrollBar);
180 }; 180 };
181 181
182 } 182 }
183 183
184 #endif // #ifndef CHROME_VIEWS_BITMAP_SCROLL_BAR_H__ 184 #endif // #ifndef CHROME_VIEWS_BITMAP_SCROLL_BAR_H__
185 185
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698