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

Unified Diff: Source/platform/scroll/ScrollbarThemeMacCommon.mm

Issue 1234783005: Add API to send NSUserDefault values over IPC, while preserving current behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
Index: Source/platform/scroll/ScrollbarThemeMacCommon.mm
diff --git a/Source/platform/scroll/ScrollbarThemeMacCommon.mm b/Source/platform/scroll/ScrollbarThemeMacCommon.mm
index cd2fe2b09f6661c8c61e283375fbe2e82b8a4017..baa40e36c4113a84acd59bb9257d237b6db6c651 100644
--- a/Source/platform/scroll/ScrollbarThemeMacCommon.mm
+++ b/Source/platform/scroll/ScrollbarThemeMacCommon.mm
@@ -67,6 +67,7 @@ static ScrollbarSet& scrollbarSet()
static float gInitialButtonDelay = 0.5f;
static float gAutoscrollButtonDelay = 0.05f;
static NSScrollerStyle gPreferredScrollerStyle = NSScrollerStyleLegacy;
+static bool gScrollAnimationEnabledForSystem = false;
ScrollbarTheme* ScrollbarTheme::nativeTheme()
{
@@ -162,11 +163,12 @@ ScrollbarThemeMacCommon::~ScrollbarThemeMacCommon()
{
}
-void ScrollbarThemeMacCommon::preferencesChanged(float initialButtonDelay, float autoscrollButtonDelay, NSScrollerStyle preferredScrollerStyle, bool redraw)
+void ScrollbarThemeMacCommon::preferencesChanged(float initialButtonDelay, float autoscrollButtonDelay, NSScrollerStyle preferredScrollerStyle, bool redraw, bool scrollAnimationEnabled, const std::string& buttonPlacement)
{
- updateButtonPlacement();
+ updateButtonPlacement(buttonPlacement);
gInitialButtonDelay = initialButtonDelay;
gAutoscrollButtonDelay = autoscrollButtonDelay;
+ gScrollAnimationEnabledForSystem = scrollAnimationEnabled;
bool sendScrollerStyleNotification = gPreferredScrollerStyle != preferredScrollerStyle;
gPreferredScrollerStyle = preferredScrollerStyle;
if (redraw && !scrollbarSet().isEmpty()) {
@@ -184,6 +186,11 @@ void ScrollbarThemeMacCommon::preferencesChanged(float initialButtonDelay, float
}
}
+bool ScrollbarThemeMacCommon::scrollAnimationEnabledForSystem()
+{
+ return gScrollAnimationEnabledForSystem;
+}
+
double ScrollbarThemeMacCommon::initialAutoscrollTimerDelay()
{
return gInitialButtonDelay;
« no previous file with comments | « Source/platform/scroll/ScrollbarThemeMacCommon.h ('k') | Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698