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

Unified Diff: Source/core/platform/ScrollbarTheme.cpp

Issue 26501002: Remove platform dependency upon page/Settings class which is a layering violation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 2 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 | « Source/core/platform/ScrollbarTheme.h ('k') | Source/core/platform/mac/NSScrollerImpDetails.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/ScrollbarTheme.cpp
diff --git a/Source/core/platform/ScrollbarTheme.cpp b/Source/core/platform/ScrollbarTheme.cpp
index 4e910b0619ac7a49258370ee95b07985eb56167f..3a53b8d9fe9bf003729fa5011ff86354ee6aa024 100644
--- a/Source/core/platform/ScrollbarTheme.cpp
+++ b/Source/core/platform/ScrollbarTheme.cpp
@@ -27,7 +27,6 @@
#include "core/platform/ScrollbarTheme.h"
#include "RuntimeEnabledFeatures.h"
-#include "core/page/Settings.h"
#include "core/platform/ScrollbarThemeClient.h"
#include "core/platform/graphics/GraphicsContext.h"
#include "core/platform/mock/ScrollbarThemeMock.h"
@@ -37,7 +36,7 @@ namespace WebCore {
ScrollbarTheme* ScrollbarTheme::theme()
{
- if (Settings::mockScrollbarsEnabled()) {
+ if (ScrollbarTheme::mockScrollbarsEnabled()) {
if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) {
DEFINE_STATIC_LOCAL(ScrollbarThemeOverlayMock, overlayMockTheme, ());
return &overlayMockTheme;
@@ -49,6 +48,18 @@ ScrollbarTheme* ScrollbarTheme::theme()
return nativeTheme();
}
+bool ScrollbarTheme::gMockScrollbarsEnabled = false;
+
+void ScrollbarTheme::setMockScrollbarsEnabled(bool flag)
+{
+ gMockScrollbarsEnabled = flag;
+}
+
+bool ScrollbarTheme::mockScrollbarsEnabled()
+{
+ return gMockScrollbarsEnabled;
+}
+
bool ScrollbarTheme::paint(ScrollbarThemeClient* scrollbar, GraphicsContext* graphicsContext, const IntRect& damageRect)
{
// Create the ScrollbarControlPartMask based on the damageRect
« no previous file with comments | « Source/core/platform/ScrollbarTheme.h ('k') | Source/core/platform/mac/NSScrollerImpDetails.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698