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

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

Issue 1690493002: Switch to LayoutThemeMobile when emulating mobile device in DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Invalidate tapHighlightColor only Created 4 years, 9 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;
33 34
34 struct PaintInfo; 35 struct PaintInfo;
35 36
36 class ThemePainter { 37 class ThemePainter {
37 DISALLOW_NEW(); 38 DISALLOW_NEW();
38 public: 39 public:
40 explicit ThemePainter(Theme*);
41
39 // This method is called to paint the widget as a background of the LayoutOb ject. A widget's foreground, e.g., the 42 // This method is called to paint the widget as a background of the LayoutOb ject. A widget's foreground, e.g., the
40 // text of a button, is always rendered by the engine itself. The boolean r eturn value indicates 43 // text of a button, is always rendered by the engine itself. The boolean r eturn value indicates
41 // whether the CSS border/background should also be painted. 44 // whether the CSS border/background should also be painted.
42 bool paint(const LayoutObject&, const PaintInfo&, const IntRect&); 45 bool paint(const LayoutObject&, const PaintInfo&, const IntRect&);
43 bool paintBorderOnly(const LayoutObject&, const PaintInfo&, const IntRect&); 46 bool paintBorderOnly(const LayoutObject&, const PaintInfo&, const IntRect&);
44 bool paintDecorations(const LayoutObject&, const PaintInfo&, const IntRect&) ; 47 bool paintDecorations(const LayoutObject&, const PaintInfo&, const IntRect&) ;
45 48
46 virtual bool paintCapsLockIndicator(const LayoutObject&, const PaintInfo&, c onst IntRect&) { return 0; } 49 virtual bool paintCapsLockIndicator(const LayoutObject&, const PaintInfo&, c onst IntRect&) { return 0; }
47 void paintSliderTicks(const LayoutObject&, const PaintInfo&, const IntRect&) ; 50 void paintSliderTicks(const LayoutObject&, const PaintInfo&, const IntRect&) ;
48 51
49 protected: 52 protected:
50 #if !USE(NEW_THEME)
51 virtual bool paintCheckbox(const LayoutObject&, const PaintInfo&, const IntR ect&) { return true; } 53 virtual bool paintCheckbox(const LayoutObject&, const PaintInfo&, const IntR ect&) { return true; }
52 virtual bool paintRadio(const LayoutObject&, const PaintInfo&, const IntRect &) { return true; } 54 virtual bool paintRadio(const LayoutObject&, const PaintInfo&, const IntRect &) { return true; }
53 virtual bool paintButton(const LayoutObject&, const PaintInfo&, const IntRec t&) { return true; } 55 virtual bool paintButton(const LayoutObject&, const PaintInfo&, const IntRec t&) { return true; }
54 virtual bool paintInnerSpinButton(const LayoutObject&, const PaintInfo&, con st IntRect&) { return true; } 56 virtual bool paintInnerSpinButton(const LayoutObject&, const PaintInfo&, con st IntRect&) { return true; }
55 #endif
56
57 virtual bool paintTextField(const LayoutObject&, const PaintInfo&, const Int Rect&) { return true; } 57 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; } 58 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; } 59 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; } 60 virtual bool paintMenuListButton(const LayoutObject&, const PaintInfo&, cons t IntRect&) { return true; }
61 virtual bool paintMeter(const LayoutObject&, const PaintInfo&, const IntRect &); 61 virtual bool paintMeter(const LayoutObject&, const PaintInfo&, const IntRect &);
62 virtual bool paintProgressBar(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; } 62 virtual bool paintProgressBar(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; }
63 virtual bool paintSliderTrack(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; } 63 virtual bool paintSliderTrack(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; }
64 virtual bool paintSliderThumb(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; } 64 virtual bool paintSliderThumb(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; }
65 virtual bool paintSearchField(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; } 65 virtual bool paintSearchField(const LayoutObject&, const PaintInfo&, const I ntRect&) { return true; }
66 virtual bool paintSearchFieldCancelButton(const LayoutObject&, const PaintIn fo&, const IntRect&) { return true; } 66 virtual bool paintSearchFieldCancelButton(const LayoutObject&, const PaintIn fo&, const IntRect&) { return true; }
67 virtual bool paintSearchFieldDecoration(const LayoutObject&, const PaintInfo &, const IntRect&) { return true; } 67 virtual bool paintSearchFieldDecoration(const LayoutObject&, const PaintInfo &, const IntRect&) { return true; }
68 virtual bool paintSearchFieldResultsDecoration(const LayoutObject&, const Pa intInfo&, const IntRect&) { return true; } 68 virtual bool paintSearchFieldResultsDecoration(const LayoutObject&, const Pa intInfo&, const IntRect&) { return true; }
69 69
70 bool paintUsingFallbackTheme(const LayoutObject&, const PaintInfo&, const In tRect&); 70 bool paintUsingFallbackTheme(const LayoutObject&, const PaintInfo&, const In tRect&);
71 bool paintCheckboxUsingFallbackTheme(const LayoutObject&, const PaintInfo&, const IntRect&); 71 bool paintCheckboxUsingFallbackTheme(const LayoutObject&, const PaintInfo&, const IntRect&);
72 bool paintRadioUsingFallbackTheme(const LayoutObject&, const PaintInfo&, con st IntRect&); 72 bool paintRadioUsingFallbackTheme(const LayoutObject&, const PaintInfo&, con st IntRect&);
73
74 private:
75 Theme* m_platformTheme; // The platform-specific theme.
73 }; 76 };
74 77
75 } // namespace blink 78 } // namespace blink
76 79
77 #endif // ThemePainter_h 80 #endif // ThemePainter_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeWin.cpp ('k') | third_party/WebKit/Source/core/paint/ThemePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698