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

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

Issue 6247012: Update ChromeOS theme engine to follow mocks in chromium-os:9256. (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 "base/compiler_specific.h"
9 #include "gfx/native_theme_linux.h" 10 #include "gfx/native_theme_linux.h"
10 11
11 class SkBitmap; 12 class SkBitmap;
12 13
13 class NativeThemeChromeos : public gfx::NativeThemeLinux { 14 class NativeThemeChromeos : public gfx::NativeThemeLinux {
14 private: 15 private:
15 friend class NativeThemeLinux; 16 friend class NativeThemeLinux;
16 NativeThemeChromeos(); 17 NativeThemeChromeos();
17 virtual ~NativeThemeChromeos(); 18 virtual ~NativeThemeChromeos();
18 19
19 // Scrollbar painting overrides 20 // Scrollbar painting overrides
20 virtual gfx::Size GetSize(Part part) const; 21 virtual gfx::Size GetSize(Part part) const OVERRIDE;
21 virtual void PaintTrack(skia::PlatformCanvas* canvas, 22 virtual void PaintTrack(skia::PlatformCanvas* canvas,
22 Part part, State state, 23 Part part, State state,
23 const ScrollbarTrackExtraParams& extra_params, 24 const ScrollbarTrackExtraParams& extra_params,
24 const gfx::Rect& rect); 25 const gfx::Rect& rect) OVERRIDE;
25 virtual void PaintArrowButton(skia::PlatformCanvas* canvas, 26 virtual void PaintArrowButton(skia::PlatformCanvas* canvas,
26 const gfx::Rect& rect, Part direction, State state); 27 const gfx::Rect& rect, Part direction, State state) OVERRIDE;
27 virtual void PaintThumb(skia::PlatformCanvas* canvas, 28 virtual void PaintThumb(skia::PlatformCanvas* canvas,
28 Part part, State state, const gfx::Rect& rect); 29 Part part, State state, const gfx::Rect& rect) OVERRIDE;
30
31 // Draw the checkbox.
32 virtual void PaintCheckbox(skia::PlatformCanvas* canvas,
33 State state, const gfx::Rect& rect,
34 const ButtonExtraParams& button) OVERRIDE;
35
36 // Draw the radio.
37 virtual void PaintRadio(skia::PlatformCanvas* canvas,
38 State state,
39 const gfx::Rect& rect,
40 const ButtonExtraParams& button) OVERRIDE;
41
42 // Draw the push button.
43 virtual void PaintButton(skia::PlatformCanvas* canvas,
44 State state,
45 const gfx::Rect& rect,
46 const ButtonExtraParams& button) OVERRIDE;
47
48 // Draw the text field.
49 virtual void PaintTextField(skia::PlatformCanvas* canvas,
50 State state,
51 const gfx::Rect& rect,
52 const TextFieldExtraParams& text) OVERRIDE;
53
54 // Draw the slider track.
55 virtual void PaintSliderTrack(skia::PlatformCanvas* canvas,
56 State state,
57 const gfx::Rect& rect,
58 const SliderExtraParams& slider) OVERRIDE;
59
60 // Draw the slider thumb.
61 virtual void PaintSliderThumb(skia::PlatformCanvas* canvas,
62 State state,
63 const gfx::Rect& rect,
64 const SliderExtraParams& slider) OVERRIDE;
65
66 // Draw the inner spin button.
67 virtual void PaintInnerSpinButton(skia::PlatformCanvas* canvas,
68 State state,
69 const gfx::Rect& rect,
70 const InnerSpinButtonExtraParams& spin_button) OVERRIDE;
71
72 // Draw the progress bar.
73 virtual void PaintProgressBar(skia::PlatformCanvas* canvas,
74 State state,
75 const gfx::Rect& rect,
76 const ProgressBarExtraParams& progress_bar) OVERRIDE;
77
29 SkBitmap* GetHorizontalBitmapNamed(int resource_id); 78 SkBitmap* GetHorizontalBitmapNamed(int resource_id);
30 79
80 // Paint a button like rounded rect with gradient background and stroke.
81 void PaintButtonLike(skia::PlatformCanvas* canvas,
82 State state, const gfx::Rect& rect,
83 const ButtonExtraParams& button);
84
31 // Cached images. The ResourceBundle caches all retrieved bitmaps and keeps 85 // Cached images. The ResourceBundle caches all retrieved bitmaps and keeps
32 // ownership of the pointers. 86 // ownership of the pointers.
33 typedef std::map<int, SkBitmap*> SkImageMap; 87 typedef std::map<int, SkBitmap*> SkImageMap;
34 SkImageMap horizontal_bitmaps_; 88 SkImageMap horizontal_bitmaps_;
35 89
36 DISALLOW_COPY_AND_ASSIGN(NativeThemeChromeos); 90 DISALLOW_COPY_AND_ASSIGN(NativeThemeChromeos);
37 }; 91 };
38 92
39 #endif // CHROME_BROWSER_CHROMEOS_NATIVE_THEME_CHROMEOS_H_ 93 #endif // CHROME_BROWSER_CHROMEOS_NATIVE_THEME_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/native_theme_chromeos.cc » ('j') | chrome/browser/chromeos/native_theme_chromeos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698