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

Side by Side Diff: ui/native_theme/native_theme_base.h

Issue 238723004: Paint state transition for overlay 9 patch scrollbars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « ui/native_theme/native_theme_aura.cc ('k') | ui/native_theme/native_theme_base.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) 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_NATIVE_THEME_NATIVE_THEME_BASE_H_ 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_BASE_H_
6 #define UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ 6 #define UI_NATIVE_THEME_NATIVE_THEME_BASE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 15 matching lines...) Expand all
26 // NativeTheme implementation: 26 // NativeTheme implementation:
27 virtual gfx::Size GetPartSize(Part part, 27 virtual gfx::Size GetPartSize(Part part,
28 State state, 28 State state,
29 const ExtraParams& extra) const OVERRIDE; 29 const ExtraParams& extra) const OVERRIDE;
30 virtual void Paint(SkCanvas* canvas, 30 virtual void Paint(SkCanvas* canvas,
31 Part part, 31 Part part,
32 State state, 32 State state,
33 const gfx::Rect& rect, 33 const gfx::Rect& rect,
34 const ExtraParams& extra) const OVERRIDE; 34 const ExtraParams& extra) const OVERRIDE;
35 35
36 virtual void PaintStateTransition(SkCanvas* canvas,
37 Part part,
38 State startState,
39 State endState,
40 double progress,
41 const gfx::Rect& rect) const OVERRIDE;
42
36 protected: 43 protected:
37 NativeThemeBase(); 44 NativeThemeBase();
38 virtual ~NativeThemeBase(); 45 virtual ~NativeThemeBase();
39 46
40 // Creates a gfx::Canvas wrapping an SkCanvas. 47 // Creates a gfx::Canvas wrapping an SkCanvas.
41 static scoped_ptr<gfx::Canvas> CreateCanvas(SkCanvas* sk_canvas); 48 static scoped_ptr<gfx::Canvas> CreateCanvas(SkCanvas* sk_canvas);
42 49
43 // Draw the arrow. Used by scrollbar and inner spin button. 50 // Draw the arrow. Used by scrollbar and inner spin button.
44 virtual void PaintArrowButton( 51 virtual void PaintArrowButton(
45 SkCanvas* gc, 52 SkCanvas* gc,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 State state, 130 State state,
124 const gfx::Rect& rect, 131 const gfx::Rect& rect,
125 const InnerSpinButtonExtraParams& spin_button) const; 132 const InnerSpinButtonExtraParams& spin_button) const;
126 133
127 virtual void PaintProgressBar( 134 virtual void PaintProgressBar(
128 SkCanvas* canvas, 135 SkCanvas* canvas,
129 State state, 136 State state,
130 const gfx::Rect& rect, 137 const gfx::Rect& rect,
131 const ProgressBarExtraParams& progress_bar) const; 138 const ProgressBarExtraParams& progress_bar) const;
132 139
140 virtual void PaintScrollbarThumbStateTransition(
141 SkCanvas* canvas,
142 State startState,
143 State endState,
144 double progress,
145 const gfx::Rect& rect) const {}
146
133 void set_scrollbar_button_length(unsigned int length) { 147 void set_scrollbar_button_length(unsigned int length) {
134 scrollbar_button_length_ = length; 148 scrollbar_button_length_ = length;
135 } 149 }
136 int scrollbar_button_length() const { return scrollbar_button_length_; } 150 int scrollbar_button_length() const { return scrollbar_button_length_; }
137 151
138 bool IntersectsClipRectInt(SkCanvas* canvas, 152 bool IntersectsClipRectInt(SkCanvas* canvas,
139 int x, int y, int w, int h) const; 153 int x, int y, int w, int h) const;
140 154
141 void DrawImageInt(SkCanvas* canvas, const gfx::ImageSkia& image, 155 void DrawImageInt(SkCanvas* canvas, const gfx::ImageSkia& image,
142 int src_x, int src_y, int src_w, int src_h, 156 int src_x, int src_y, int src_w, int src_h,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 204
191 unsigned int scrollbar_width_; 205 unsigned int scrollbar_width_;
192 unsigned int scrollbar_button_length_; 206 unsigned int scrollbar_button_length_;
193 207
194 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); 208 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase);
195 }; 209 };
196 210
197 } // namespace ui 211 } // namespace ui
198 212
199 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ 213 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_aura.cc ('k') | ui/native_theme/native_theme_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698