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

Side by Side Diff: third_party/WebKit/Source/core/paint/ThemePainter.h

Issue 2309593002: Factor code from ThemeMac into ThemeMacPainter. (Closed)
Patch Set: none Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * This file is part of the theme implementation for form controls in WebCore. 2 * This file is part of the theme implementation for form controls in WebCore.
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 12 matching lines...) Expand all
23 #ifndef ThemePainter_h 23 #ifndef ThemePainter_h
24 #define ThemePainter_h 24 #define ThemePainter_h
25 25
26 #include "platform/ThemeTypes.h" 26 #include "platform/ThemeTypes.h"
27 #include "wtf/Allocator.h" 27 #include "wtf/Allocator.h"
28 28
29 namespace blink { 29 namespace blink {
30 30
31 class IntRect; 31 class IntRect;
32 class LayoutObject; 32 class LayoutObject;
33 class Theme;
34 33
35 struct PaintInfo; 34 struct PaintInfo;
36 35
37 class ThemePainter { 36 class ThemePainter {
38 DISALLOW_NEW(); 37 DISALLOW_NEW();
39 public: 38 public:
40 explicit ThemePainter(Theme*); 39 explicit ThemePainter();
41 40
42 // This method is called to paint the widget as a background of the LayoutOb ject. A widget's foreground, e.g., the 41 // This method is called to paint the widget as a background of the LayoutOb ject. A widget's foreground, e.g., the
43 // text of a button, is always rendered by the engine itself. The boolean r eturn value indicates 42 // text of a button, is always rendered by the engine itself. The boolean r eturn value indicates
44 // whether the CSS border/background should also be painted. 43 // whether the CSS border/background should also be painted.
45 bool paint(const LayoutObject&, const PaintInfo&, const IntRect&); 44 bool paint(const LayoutObject&, const PaintInfo&, const IntRect&);
46 bool paintBorderOnly(const LayoutObject&, const PaintInfo&, const IntRect&); 45 bool paintBorderOnly(const LayoutObject&, const PaintInfo&, const IntRect&);
47 bool paintDecorations(const LayoutObject&, const PaintInfo&, const IntRect&) ; 46 bool paintDecorations(const LayoutObject&, const PaintInfo&, const IntRect&) ;
48 47
49 virtual bool paintCapsLockIndicator(const LayoutObject&, const PaintInfo&, c onst IntRect&) { return 0; } 48 virtual bool paintCapsLockIndicator(const LayoutObject&, const PaintInfo&, c onst IntRect&) { return 0; }
50 void paintSliderTicks(const LayoutObject&, const PaintInfo&, const IntRect&) ; 49 void paintSliderTicks(const LayoutObject&, const PaintInfo&, const IntRect&) ;
51 50
52 protected: 51 protected:
53 virtual bool paintCheckbox(const LayoutObject&, const PaintInfo&, const IntR ect&) { return true; } 52 virtual bool paintCheckbox(const LayoutObject&, const PaintInfo&, const IntR ect&) { return true; }
54 virtual bool paintRadio(const LayoutObject&, const PaintInfo&, const IntRect &) { return true; } 53 virtual bool paintRadio(const LayoutObject&, const PaintInfo&, const IntRect &) { return true; }
55 virtual bool paintButton(const LayoutObject&, const PaintInfo&, const IntRec t&) { return true; } 54 virtual bool paintButton(const LayoutObject&, const PaintInfo&, const IntRec t&) { return true; }
56 virtual bool paintInnerSpinButton(const LayoutObject&, const PaintInfo&, con st IntRect&) { return true; } 55 virtual bool paintInnerSpinButton(const LayoutObject&, const PaintInfo&, con st IntRect&) { return true; }
57 virtual bool paintTextField(const LayoutObject&, const PaintInfo&, const Int Rect&) { return true; } 56 virtual bool paintTextField(const LayoutObject&, const PaintInfo&, const Int Rect&) { return true; }
58 virtual bool paintTextArea(const LayoutObject&, const PaintInfo&, const IntR ect&) { return true; } 57 virtual bool paintTextArea(const LayoutObject&, const PaintInfo&, const IntR ect&) { return true; }
59 virtual bool paintMenuList(const LayoutObject&, const PaintInfo&, const IntR ect&) { return true; } 58 virtual bool paintMenuList(const LayoutObject&, const PaintInfo&, const IntR ect&) { return true; }
60 virtual bool paintMenuListButton(const LayoutObject&, const PaintInfo&, cons t IntRect&) { return true; } 59 virtual bool paintMenuListButton(const LayoutObject&, const PaintInfo&, cons t IntRect&) { return true; }
61 virtual bool paintProgressBar(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; } 60 virtual bool paintProgressBar(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; }
62 virtual bool paintSliderTrack(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; } 61 virtual bool paintSliderTrack(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; }
63 virtual bool paintSliderThumb(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; } 62 virtual bool paintSliderThumb(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; }
64 virtual bool paintSearchField(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; } 63 virtual bool paintSearchField(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; }
65 virtual bool paintSearchFieldCancelButton(const LayoutObject&, const PaintIn fo&, const IntRect&) { return true; } 64 virtual bool paintSearchFieldCancelButton(const LayoutObject&, const PaintIn fo&, const IntRect&) { return true; }
66 65
67 bool paintUsingFallbackTheme(const LayoutObject&, const PaintInfo&, const In tRect&); 66 bool paintUsingFallbackTheme(const LayoutObject&, const PaintInfo&, const In tRect&);
68 bool paintCheckboxUsingFallbackTheme(const LayoutObject&, const PaintInfo&, const IntRect&); 67 bool paintCheckboxUsingFallbackTheme(const LayoutObject&, const PaintInfo&, const IntRect&);
69 bool paintRadioUsingFallbackTheme(const LayoutObject&, const PaintInfo&, con st IntRect&); 68 bool paintRadioUsingFallbackTheme(const LayoutObject&, const PaintInfo&, con st IntRect&);
70
71 private:
72 Theme* m_platformTheme; // The platform-specific theme.
73 }; 69 };
74 70
75 } // namespace blink 71 } // namespace blink
76 72
77 #endif // ThemePainter_h 73 #endif // ThemePainter_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMac.mm ('k') | third_party/WebKit/Source/core/paint/ThemePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698