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

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

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/views/bitmap_scroll_bar.h ('k') | chrome/views/chrome_menu.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 #include "chrome/views/bitmap_scroll_bar.h" 5 #include "chrome/views/bitmap_scroll_bar.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/common/gfx/chrome_canvas.h" 8 #include "chrome/common/gfx/chrome_canvas.h"
9 #include "chrome/common/l10n_util.h" 9 #include "chrome/common/l10n_util.h"
10 #include "chrome/views/menu.h" 10 #include "chrome/views/menu.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 // Returns the bitmap that is tiled in the background of the thumb between 215 // Returns the bitmap that is tiled in the background of the thumb between
216 // the start and the end caps. 216 // the start and the end caps.
217 SkBitmap* background_bitmap() const { 217 SkBitmap* background_bitmap() const {
218 return scroll_bar_->images_[BitmapScrollBar::THUMB_MIDDLE][state_]; 218 return scroll_bar_->images_[BitmapScrollBar::THUMB_MIDDLE][state_];
219 } 219 }
220 220
221 // Returns the bitmap that is rendered in the middle of the thumb 221 // Returns the bitmap that is rendered in the middle of the thumb
222 // transparently over the background bitmap. 222 // transparently over the background bitmap.
223 SkBitmap* grippy_bitmap() const { 223 SkBitmap* grippy_bitmap() const {
224 return scroll_bar_->images_[BitmapScrollBar::THUMB_GRIPPY][BaseButton::BS_NO RMAL]; 224 return scroll_bar_->images_[BitmapScrollBar::THUMB_GRIPPY]
225 [BaseButton::BS_NORMAL];
225 } 226 }
226 227
227 // Update our state and schedule a repaint when the mouse moves over us. 228 // Update our state and schedule a repaint when the mouse moves over us.
228 void SetState(BaseButton::ButtonState state) { 229 void SetState(BaseButton::ButtonState state) {
229 state_ = state; 230 state_ = state;
230 SchedulePaint(); 231 SchedulePaint();
231 } 232 }
232 233
233 // The BitmapScrollBar that owns us. 234 // The BitmapScrollBar that owns us.
234 BitmapScrollBar* scroll_bar_; 235 BitmapScrollBar* scroll_bar_;
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 return (thumb_position * contents_size_) / GetTrackSize(); 696 return (thumb_position * contents_size_) / GetTrackSize();
696 } 697 }
697 698
698 void BitmapScrollBar::SetThumbTrackState(BaseButton::ButtonState state) { 699 void BitmapScrollBar::SetThumbTrackState(BaseButton::ButtonState state) {
699 thumb_track_state_ = state; 700 thumb_track_state_ = state;
700 SchedulePaint(); 701 SchedulePaint();
701 } 702 }
702 703
703 } // namespace views 704 } // namespace views
704 705
OLDNEW
« no previous file with comments | « chrome/views/bitmap_scroll_bar.h ('k') | chrome/views/chrome_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698