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

Side by Side Diff: content/child/webthemeengine_impl_default.cc

Issue 1544273002: Switch to standard integer types in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/webthemeengine_impl_default.h" 5 #include "content/child/webthemeengine_impl_default.h"
6 6
7 #include "build/build_config.h"
7 #include "skia/ext/platform_canvas.h" 8 #include "skia/ext/platform_canvas.h"
8 #include "third_party/WebKit/public/platform/WebRect.h" 9 #include "third_party/WebKit/public/platform/WebRect.h"
9 #include "third_party/WebKit/public/platform/WebSize.h" 10 #include "third_party/WebKit/public/platform/WebSize.h"
10 #include "ui/native_theme/native_theme.h" 11 #include "ui/native_theme/native_theme.h"
11 12
12 using blink::WebCanvas; 13 using blink::WebCanvas;
13 using blink::WebColor; 14 using blink::WebColor;
14 using blink::WebRect; 15 using blink::WebRect;
15 using blink::WebThemeEngine; 16 using blink::WebThemeEngine;
16 17
17 namespace content { 18 namespace content {
18 namespace { 19 namespace {
19 20
20 #if defined(OS_WIN) 21 #if defined(OS_WIN)
21 // The scrollbar metrics default to 17 dips which is the default value on 22 // The scrollbar metrics default to 17 dips which is the default value on
22 // Windows in most cases. 23 // Windows in most cases.
23 int32 g_vertical_scroll_bar_width = 17; 24 int32_t g_vertical_scroll_bar_width = 17;
24 25
25 // The height of a horizontal scroll bar in dips. 26 // The height of a horizontal scroll bar in dips.
26 int32 g_horizontal_scroll_bar_height = 17; 27 int32_t g_horizontal_scroll_bar_height = 17;
27 28
28 // The height of the arrow bitmap on a vertical scroll bar in dips. 29 // The height of the arrow bitmap on a vertical scroll bar in dips.
29 int32 g_vertical_arrow_bitmap_height = 17; 30 int32_t g_vertical_arrow_bitmap_height = 17;
30 31
31 // The width of the arrow bitmap on a horizontal scroll bar in dips. 32 // The width of the arrow bitmap on a horizontal scroll bar in dips.
32 int32 g_horizontal_arrow_bitmap_width = 17; 33 int32_t g_horizontal_arrow_bitmap_width = 17;
33 #endif 34 #endif
34 35
35 } // namespace 36 } // namespace
36 37
37 static ui::NativeTheme::Part NativeThemePart( 38 static ui::NativeTheme::Part NativeThemePart(
38 WebThemeEngine::Part part) { 39 WebThemeEngine::Part part) {
39 switch (part) { 40 switch (part) {
40 case WebThemeEngine::PartScrollbarDownArrow: 41 case WebThemeEngine::PartScrollbarDownArrow:
41 return ui::NativeTheme::kScrollbarDownArrow; 42 return ui::NativeTheme::kScrollbarDownArrow;
42 case WebThemeEngine::PartScrollbarLeftArrow: 43 case WebThemeEngine::PartScrollbarLeftArrow:
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 double progress, 229 double progress,
229 const blink::WebRect& rect) { 230 const blink::WebRect& rect) {
230 ui::NativeTheme::GetInstanceForWeb()->PaintStateTransition( 231 ui::NativeTheme::GetInstanceForWeb()->PaintStateTransition(
231 canvas, NativeThemePart(part), NativeThemeState(startState), 232 canvas, NativeThemePart(part), NativeThemeState(startState),
232 NativeThemeState(endState), progress, gfx::Rect(rect)); 233 NativeThemeState(endState), progress, gfx::Rect(rect));
233 } 234 }
234 235
235 #if defined(OS_WIN) 236 #if defined(OS_WIN)
236 // static 237 // static
237 void WebThemeEngineImpl::cacheScrollBarMetrics( 238 void WebThemeEngineImpl::cacheScrollBarMetrics(
238 int32 vertical_scroll_bar_width, 239 int32_t vertical_scroll_bar_width,
239 int32 horizontal_scroll_bar_height, 240 int32_t horizontal_scroll_bar_height,
240 int32 vertical_arrow_bitmap_height, 241 int32_t vertical_arrow_bitmap_height,
241 int32 horizontal_arrow_bitmap_width) { 242 int32_t horizontal_arrow_bitmap_width) {
242 g_vertical_scroll_bar_width = vertical_scroll_bar_width; 243 g_vertical_scroll_bar_width = vertical_scroll_bar_width;
243 g_horizontal_scroll_bar_height = horizontal_scroll_bar_height; 244 g_horizontal_scroll_bar_height = horizontal_scroll_bar_height;
244 g_vertical_arrow_bitmap_height = vertical_arrow_bitmap_height; 245 g_vertical_arrow_bitmap_height = vertical_arrow_bitmap_height;
245 g_horizontal_arrow_bitmap_width = horizontal_arrow_bitmap_width; 246 g_horizontal_arrow_bitmap_width = horizontal_arrow_bitmap_width;
246 } 247 }
247 #endif 248 #endif
248 249
249 } // namespace content 250 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webthemeengine_impl_default.h ('k') | content/child/weburlresponse_extradata_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698