OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/gfx/native_theme_chromeos.h" | 5 #include "ui/gfx/native_theme_chromeos.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "grit/gfx_resources.h" | 9 #include "grit/gfx_resources.h" |
10 #include "third_party/skia/include/effects/SkGradientShader.h" | 10 #include "third_party/skia/include/effects/SkGradientShader.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 NativeThemeChromeos::~NativeThemeChromeos() { | 250 NativeThemeChromeos::~NativeThemeChromeos() { |
251 } | 251 } |
252 | 252 |
253 gfx::Size NativeThemeChromeos::GetPartSize(Part part, | 253 gfx::Size NativeThemeChromeos::GetPartSize(Part part, |
254 State state, | 254 State state, |
255 const ExtraParams& extra) const { | 255 const ExtraParams& extra) const { |
256 // This function might be called from Worker process during html layout | 256 // This function might be called from Worker process during html layout |
257 // without calling GfxModule::SetResourceProvider. So using dimension | 257 // without calling GfxModule::SetResourceProvider. So using dimension |
258 // constants instead of getting it from resource images. | 258 // constants instead of getting it from resource images. |
259 #if defined(TOUCH_UI) | |
260 static const int kScrollbarWidth = 0; | |
261 #else | |
262 static const int kScrollbarWidth = 13; | 259 static const int kScrollbarWidth = 13; |
263 #endif | |
264 static const int kScrollbarArrowUpHeight = 12; | 260 static const int kScrollbarArrowUpHeight = 12; |
265 static const int kScrollbarArrowDownHeight = 12; | 261 static const int kScrollbarArrowDownHeight = 12; |
266 | 262 |
267 int width = 0, height = 0; | 263 int width = 0, height = 0; |
268 switch (part) { | 264 switch (part) { |
269 case kScrollbarUpArrow: | 265 case kScrollbarUpArrow: |
270 width = kScrollbarWidth; | 266 width = kScrollbarWidth; |
271 height = kScrollbarArrowUpHeight; | 267 height = kScrollbarArrowUpHeight; |
272 break; | 268 break; |
273 case kScrollbarDownArrow: | 269 case kScrollbarDownArrow: |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 | 753 |
758 if (stroke_border) { | 754 if (stroke_border) { |
759 SkPaint stroke_paint; | 755 SkPaint stroke_paint; |
760 GetStrokePaint(state, &stroke_paint); | 756 GetStrokePaint(state, &stroke_paint); |
761 canvas->drawPath(border, stroke_paint); | 757 canvas->drawPath(border, stroke_paint); |
762 } | 758 } |
763 } | 759 } |
764 | 760 |
765 } // namespace gfx | 761 } // namespace gfx |
766 | 762 |
OLD | NEW |