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

Side by Side Diff: chrome/browser/chromeos/native_theme_chromeos.h

Issue 6254004: Move more web widgets painting from webkit to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_BROWSER_CHROMEOS_NATIVE_THEME_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_NATIVE_THEME_CHROMEOS_H_
6 #define CHROME_BROWSER_CHROMEOS_NATIVE_THEME_CHROMEOS_H_ 6 #define CHROME_BROWSER_CHROMEOS_NATIVE_THEME_CHROMEOS_H_
7 7
8 #include <map> 8 #include <map>
9 #include "gfx/native_theme_linux.h" 9 #include "gfx/native_theme_linux.h"
10 10
11 class SkBitmap; 11 class SkBitmap;
12 12
13 class NativeThemeChromeos : public gfx::NativeThemeLinux { 13 class NativeThemeChromeos : public gfx::NativeThemeLinux {
14 private: 14 private:
15 friend class NativeThemeLinux; 15 friend class NativeThemeLinux;
16 NativeThemeChromeos(); 16 NativeThemeChromeos();
17 virtual ~NativeThemeChromeos(); 17 virtual ~NativeThemeChromeos();
18 18
19 // Scrollbar painting overrides 19 // Scrollbar painting overrides
20 virtual gfx::Size GetSize(Part part) const; 20 virtual gfx::Size GetSize(Part part) const;
21 virtual void PaintTrack(skia::PlatformCanvas* canvas, 21 virtual void PaintTrack(skia::PlatformCanvas* canvas,
22 Part part, State state, 22 Part part, State state,
23 const ScrollbarTrackExtraParams& extra_params, 23 const ScrollbarTrackExtraParams& extra_params,
24 const gfx::Rect& rect); 24 const gfx::Rect& rect);
25 virtual void PaintArrowButton(skia::PlatformCanvas* canvas, 25 virtual void PaintArrowButton(skia::PlatformCanvas* canvas,
26 const gfx::Rect& rect, Part direction, State state); 26 const gfx::Rect& rect, Part direction, State state);
27 virtual void PaintThumb(skia::PlatformCanvas* canvas, 27 virtual void PaintThumb(skia::PlatformCanvas* canvas,
28 Part part, State state, const gfx::Rect& rect); 28 Part part, State state, const gfx::Rect& rect);
29
30 // Draw the checkbox.
31 virtual void PaintCheckbox(skia::PlatformCanvas* canvas,
32 State state, const gfx::Rect& rect,
33 const ButtonExtraParams& button);
tony 2011/01/14 22:06:04 Can you add OVERRIDE to the end of these methods?
xiyuan 2011/01/18 21:30:49 Done. And moved the chromeos specific changes into
34
35 // Draw the radio.
36 virtual void PaintRadio(skia::PlatformCanvas* canvas,
37 State state,
38 const gfx::Rect& rect,
39 const ButtonExtraParams& button);
40
41 // Draw the push button.
42 virtual void PaintButton(skia::PlatformCanvas* canvas,
43 State state,
44 const gfx::Rect& rect,
45 const ButtonExtraParams& button);
46
47 // Draw the text field.
48 virtual void PaintTextField(skia::PlatformCanvas* canvas,
49 State state,
50 const gfx::Rect& rect,
51 const TextFieldExtraParams& text);
52
53 // Draw the slider track.
54 virtual void PaintSliderTrack(skia::PlatformCanvas* canvas,
55 State state,
56 const gfx::Rect& rect,
57 const SliderExtraParams& slider);
58
59 // Draw the slider thumb.
60 virtual void PaintSliderThumb(skia::PlatformCanvas* canvas,
61 State state,
62 const gfx::Rect& rect,
63 const SliderExtraParams& slider);
64
65 // Draw the inner spin button.
66 virtual void PaintInnerSpinButton(skia::PlatformCanvas* canvas,
67 State state,
68 const gfx::Rect& rect,
69 const InnerSpinButtonExtraParams& spin_button);
70
71 // Draw the progress bar.
72 virtual void PaintProgressBar(skia::PlatformCanvas* canvas,
73 State state,
74 const gfx::Rect& rect,
75 const ProgressBarExtraParams& progress_bar);
76
29 SkBitmap* GetHorizontalBitmapNamed(int resource_id); 77 SkBitmap* GetHorizontalBitmapNamed(int resource_id);
30 78
79 // Paint a button like rounded rect with gradient background and stroke.
80 void PaintButtonLike(skia::PlatformCanvas* canvas,
81 State state, const gfx::Rect& rect,
82 const ButtonExtraParams& button);
83
31 // Cached images. The ResourceBundle caches all retrieved bitmaps and keeps 84 // Cached images. The ResourceBundle caches all retrieved bitmaps and keeps
32 // ownership of the pointers. 85 // ownership of the pointers.
33 typedef std::map<int, SkBitmap*> SkImageMap; 86 typedef std::map<int, SkBitmap*> SkImageMap;
34 SkImageMap horizontal_bitmaps_; 87 SkImageMap horizontal_bitmaps_;
35 88
36 DISALLOW_COPY_AND_ASSIGN(NativeThemeChromeos); 89 DISALLOW_COPY_AND_ASSIGN(NativeThemeChromeos);
37 }; 90 };
38 91
39 #endif // CHROME_BROWSER_CHROMEOS_NATIVE_THEME_CHROMEOS_H_ 92 #endif // CHROME_BROWSER_CHROMEOS_NATIVE_THEME_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698