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

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

Issue 1245323002: Pass scroll bar placement as an enum instead of std::string (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix the headers to pass depchecks 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/ScrollbarThemeMacNonOverlayAPI.mm
diff --git a/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm b/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm
index 1aaec1b8fd19ac1132eb0371d72279bca310af7d..b42ceb5bb6f601c595366cdabb9a5aeda4d822e5 100644
--- a/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm
+++ b/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm
@@ -58,16 +58,9 @@ static int cOuterButtonOverlap = 2;
static ScrollbarButtonsPlacement gButtonPlacement = ScrollbarButtonsDoubleEnd;
-void ScrollbarThemeMacNonOverlayAPI::updateButtonPlacement(const std::string& buttonPlacement)
+void ScrollbarThemeMacNonOverlayAPI::updateButtonPlacement(ScrollbarButtonsPlacement buttonPlacement)
{
- if (buttonPlacement == "Single")
- gButtonPlacement = ScrollbarButtonsSingle;
- else if (buttonPlacement == "DoubleMin")
- gButtonPlacement = ScrollbarButtonsDoubleStart;
- else if (buttonPlacement == "DoubleBoth")
- gButtonPlacement = ScrollbarButtonsDoubleBoth;
- else
- gButtonPlacement = ScrollbarButtonsDoubleEnd;
+ gButtonPlacement = buttonPlacement;
}
// Override ScrollbarThemeMacCommon::paint() to add support for the following:

Powered by Google App Engine
This is Rietveld 408576698