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

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

Issue 42013: Slight code change to make some global variables const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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
« no previous file with comments | « chrome/tools/profiles/generate_profile.cc ('k') | chrome/views/bitmap_scroll_bar.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27 matching lines...) Expand all
38 public Menu::Delegate { 38 public Menu::Delegate {
39 public: 39 public:
40 BitmapScrollBar(bool horizontal, bool show_scroll_buttons); 40 BitmapScrollBar(bool horizontal, bool show_scroll_buttons);
41 virtual ~BitmapScrollBar() { } 41 virtual ~BitmapScrollBar() { }
42 42
43 // Get the bounds of the "track" area that the thumb is free to slide within. 43 // Get the bounds of the "track" area that the thumb is free to slide within.
44 gfx::Rect GetTrackBounds() const; 44 gfx::Rect GetTrackBounds() const;
45 45
46 // A list of parts that the user may supply bitmaps for. 46 // A list of parts that the user may supply bitmaps for.
47 enum ScrollBarPart { 47 enum ScrollBarPart {
48 PREV_BUTTON = 0, // The button used to represent scrolling up/left by 1 l ine. 48 // The button used to represent scrolling up/left by 1 line.
49 NEXT_BUTTON, // The button used to represent scrolling down/right by 1 line. 49 PREV_BUTTON = 0,
50 // IMPORTANT: The code assumes the prev and next 50 // The button used to represent scrolling down/right by 1 line.
51 // buttons have equal width and equal height. 51 // IMPORTANT: The code assumes the prev and next
52 THUMB_START_CAP, // The top/left segment of the thumb on the scrollbar. 52 // buttons have equal width and equal height.
53 THUMB_MIDDLE, // The tiled background image of the thumb. 53 NEXT_BUTTON,
54 THUMB_END_CAP, // The bottom/right segment of the thumb on the scrollba r. 54 // The top/left segment of the thumb on the scrollbar.
55 THUMB_GRIPPY, // The grippy that is rendered in the center of the thum b. 55 THUMB_START_CAP,
56 THUMB_TRACK, // The tiled background image of the thumb track. 56 // The tiled background image of the thumb.
57 THUMB_MIDDLE,
58 // The bottom/right segment of the thumb on the scrollbar.
59 THUMB_END_CAP,
60 // The grippy that is rendered in the center of the thumb.
61 THUMB_GRIPPY,
62 // The tiled background image of the thumb track.
63 THUMB_TRACK,
57 PART_COUNT 64 PART_COUNT
58 }; 65 };
59 66
60 // Sets the bitmap to be rendered for the specified part and state. 67 // Sets the bitmap to be rendered for the specified part and state.
61 void SetImage(ScrollBarPart part, 68 void SetImage(ScrollBarPart part,
62 BaseButton::ButtonState state, 69 BaseButton::ButtonState state,
63 SkBitmap* bitmap); 70 SkBitmap* bitmap);
64 71
65 // An enumeration of different amounts of incremental scroll, representing 72 // An enumeration of different amounts of incremental scroll, representing
66 // events sent from different parts of the UI/keyboard. 73 // events sent from different parts of the UI/keyboard.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // True if the scroll buttons at each end of the scroll bar should be shown. 184 // True if the scroll buttons at each end of the scroll bar should be shown.
178 bool show_scroll_buttons_; 185 bool show_scroll_buttons_;
179 186
180 DISALLOW_EVIL_CONSTRUCTORS(BitmapScrollBar); 187 DISALLOW_EVIL_CONSTRUCTORS(BitmapScrollBar);
181 }; 188 };
182 189
183 } // namespace views 190 } // namespace views
184 191
185 #endif // #ifndef CHROME_VIEWS_BITMAP_SCROLL_BAR_H__ 192 #endif // #ifndef CHROME_VIEWS_BITMAP_SCROLL_BAR_H__
186 193
OLDNEW
« no previous file with comments | « chrome/tools/profiles/generate_profile.cc ('k') | chrome/views/bitmap_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698