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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTheme.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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/layout/LayoutTheme.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutTheme.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTheme.h b/third_party/WebKit/Source/core/layout/LayoutTheme.h
index bab7c4d71755405f87ac3d977da8538c289c2e0e..31a7cad3e1696461b8879ce4a21c1355b4a6504a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTheme.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTheme.h
@@ -43,13 +43,11 @@ class ThemePainter;
class CORE_EXPORT LayoutTheme : public RefCounted<LayoutTheme> {
protected:
- LayoutTheme();
+ explicit LayoutTheme(Theme*);
public:
virtual ~LayoutTheme() { }
- // This function is to be implemented in your platform-specific theme implementation to hand back the
- // appropriate platform theme.
static LayoutTheme& theme();
virtual ThemePainter& painter() = 0;
@@ -202,7 +200,6 @@ protected:
virtual bool themeDrawsFocusRing(const ComputedStyle&) const = 0;
-#if !USE(NEW_THEME)
// Methods for each appearance value.
virtual void adjustCheckboxStyle(ComputedStyle&) const;
virtual void setCheckboxSize(ComputedStyle&) const { }
@@ -212,7 +209,6 @@ protected:
virtual void adjustButtonStyle(ComputedStyle&) const;
virtual void adjustInnerSpinButtonStyle(ComputedStyle&) const;
-#endif
virtual void adjustMenuListStyle(ComputedStyle&, Element*) const;
virtual void adjustMenuListButtonStyle(ComputedStyle&, Element*) const;
@@ -225,6 +221,8 @@ protected:
void adjustCheckboxStyleUsingFallbackTheme(ComputedStyle&) const;
void adjustRadioStyleUsingFallbackTheme(ComputedStyle&) const;
+ bool hasPlatformTheme() const { return m_platformTheme; }
+
public:
// Methods for state querying
static ControlStates controlStatesForLayoutObject(const LayoutObject&);
@@ -240,6 +238,10 @@ public:
static bool isReadOnlyControl(const LayoutObject&);
private:
+ // This function is to be implemented in your platform-specific theme implementation to hand back the
+ // appropriate platform theme.
+ static LayoutTheme& nativeTheme();
+
Color m_customFocusRingColor;
bool m_hasCustomFocusRingColor;
@@ -249,9 +251,7 @@ private:
static const RGBA32 defaultCompositionBackgroundColor = 0xFFFFDD55;
-#if USE(NEW_THEME)
Theme* m_platformTheme; // The platform-specific theme.
-#endif
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/layout/LayoutTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698