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

Unified Diff: content/child/webthemeengine_impl_default.h

Issue 1054243002: Avoid calling the GetSystemMetrics API in the renderer process on Windows to get the scrollbar metr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/child/webthemeengine_impl_default.h
diff --git a/content/child/webthemeengine_impl_default.h b/content/child/webthemeengine_impl_default.h
index b757d441b39955ccc186443de7f5bb69c89c3ce1..5fd96ed36f37ac3990bfb4be78afef6fe1f1893d 100644
--- a/content/child/webthemeengine_impl_default.h
+++ b/content/child/webthemeengine_impl_default.h
@@ -25,6 +25,33 @@ class WebThemeEngineImpl : public blink::WebThemeEngine {
blink::WebThemeEngine::State endState,
double progress,
const blink::WebRect& rect);
+
+ // The next 4 functions are only invoked on Windows.
jam 2015/04/03 15:08:19 why not behind OS_WIN?
ananta 2015/04/03 19:17:04 Done.
+
+ // Caches the vertical scrollbar width.
+ static void SetVerticalScrollbarWidth(int32 vertical_scroll_bar_width);
+
+ // Caches the horizontal scrollbar height.
+ static void SetHorizontalScrollbarHeight(int32 horizontal_scroll_bar_height);
+
+ // Caches the vertical scrollbar arrow bitmap.
+ static void SetVerticalArrowBitmapHeight(int32 vertical_arrow_bitmap_height);
+
+ // Caches the horizontal scrollbar arrow bitmap.
+ static void SetHorizontalArrowBitmapWidth(int32 horizontal_arrow_bitmap_width);
jam 2015/04/03 15:08:19 nit 80 chars
ananta 2015/04/03 19:17:04 The four functions here have been collapsed to one
+
+ private:
+ // The width of a vertical scroll bar in dips.
+ static int32 vertical_scroll_bar_width_;
jam 2015/04/03 15:08:19 nit: i think the convention is to put these as glo
ananta 2015/04/03 19:17:04 Done.
+
+ // The height of a horizontal scroll bar in dips.
+ static int32 horizontal_scroll_bar_height_;
+
+ // The height of the arrow bitmap on a vertical scroll bar in dips.
+ static int32 vertical_arrow_bitmap_height_;
+
+ // The width of the arrow bitmap on a horizontal scroll bar in dips.
+ static int32 horizontal_arrow_bitmap_width_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698