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

Side by Side Diff: ui/native_theme/native_theme_aura.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.h ('k') | ui/native_theme/native_theme_aura.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_AURA_H_ 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_AURA_H_
6 #define UI_NATIVE_THEME_NATIVE_THEME_AURA_H_ 6 #define UI_NATIVE_THEME_NATIVE_THEME_AURA_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 "ui/native_theme/fallback_theme.h" 10 #include "ui/native_theme/fallback_theme.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const ScrollbarTrackExtraParams& extra_params, 45 const ScrollbarTrackExtraParams& extra_params,
46 const gfx::Rect& rect) const OVERRIDE; 46 const gfx::Rect& rect) const OVERRIDE;
47 virtual void PaintScrollbarThumb(SkCanvas* sk_canvas, 47 virtual void PaintScrollbarThumb(SkCanvas* sk_canvas,
48 Part part, 48 Part part,
49 State state, 49 State state,
50 const gfx::Rect& rect) const OVERRIDE; 50 const gfx::Rect& rect) const OVERRIDE;
51 virtual void PaintScrollbarCorner(SkCanvas* canvas, 51 virtual void PaintScrollbarCorner(SkCanvas* canvas,
52 State state, 52 State state,
53 const gfx::Rect& rect) const OVERRIDE; 53 const gfx::Rect& rect) const OVERRIDE;
54 54
55 virtual void PaintScrollbarThumbStateTransition(SkCanvas* canvas,
56 State startState,
57 State endState,
58 double progress,
59 const gfx::Rect& rect) const
60 OVERRIDE;
61
55 // Returns the NineImagePainter used to paint the specified state, creating if 62 // Returns the NineImagePainter used to paint the specified state, creating if
56 // necessary. If no image is provided for the specified state the normal state 63 // necessary. If no image is provided for the specified state the normal state
57 // images are used. 64 // images are used.
58 gfx::NineImagePainter* GetOrCreatePainter( 65 gfx::NineImagePainter* GetOrCreatePainter(
59 const int image_ids[kMaxState][9], 66 const int image_ids[kMaxState][9],
60 State state, 67 State state,
61 scoped_ptr<gfx::NineImagePainter> painters[kMaxState]) const; 68 scoped_ptr<gfx::NineImagePainter> painters[kMaxState]) const;
62 69
63 // Paints |painter| into the canvas using |rect|. 70 // Paints |painter| into the canvas using |rect|.
64 void PaintPainter(gfx::NineImagePainter* painter, 71 void PaintPainter(gfx::NineImagePainter* painter,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const uint8 fill_alphas[kMaxState], 105 const uint8 fill_alphas[kMaxState],
99 const int stroke_image_ids[9], 106 const int stroke_image_ids[9],
100 const uint8 stroke_alphas[kMaxState]) const; 107 const uint8 stroke_alphas[kMaxState]) const;
101 108
102 // Paints |dualPainter| into the canvas using |rect| and specific alpha. 109 // Paints |dualPainter| into the canvas using |rect| and specific alpha.
103 void PaintDualPainter(DualPainter* dual_painter, 110 void PaintDualPainter(DualPainter* dual_painter,
104 SkCanvas* sk_canvas, 111 SkCanvas* sk_canvas,
105 const gfx::Rect& rect, 112 const gfx::Rect& rect,
106 State state) const; 113 State state) const;
107 114
115 void PaintDualPainterTransition(DualPainter* dual_painter,
116 SkCanvas* sk_canvas,
117 const gfx::Rect& rect,
118 State startState,
119 State endState,
120 double progress) const;
121
108 mutable scoped_ptr<DualPainter> scrollbar_overlay_thumb_painter_; 122 mutable scoped_ptr<DualPainter> scrollbar_overlay_thumb_painter_;
109 123
110 DISALLOW_COPY_AND_ASSIGN(NativeThemeAura); 124 DISALLOW_COPY_AND_ASSIGN(NativeThemeAura);
111 }; 125 };
112 126
113 } // namespace ui 127 } // namespace ui
114 128
115 #endif // UI_NATIVE_THEME_NATIVE_THEME_AURA_H_ 129 #endif // UI_NATIVE_THEME_NATIVE_THEME_AURA_H_
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme.h ('k') | ui/native_theme/native_theme_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698