| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/native_theme_chromeos.h" | 5 #include "chrome/browser/chromeos/native_theme_chromeos.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 case kScrollbarVerticalTrack: | 117 case kScrollbarVerticalTrack: |
| 118 width = scrollbar_width; | 118 width = scrollbar_width; |
| 119 height = 0; | 119 height = 0; |
| 120 break; | 120 break; |
| 121 case kScrollbarHorizontalThumb: | 121 case kScrollbarHorizontalThumb: |
| 122 case kScrollbarVerticalThumb: | 122 case kScrollbarVerticalThumb: |
| 123 // allow thumb to be square but no shorter. | 123 // allow thumb to be square but no shorter. |
| 124 width = scrollbar_width; | 124 width = scrollbar_width; |
| 125 height = scrollbar_width; | 125 height = scrollbar_width; |
| 126 break; | 126 break; |
| 127 default: |
| 128 return NativeThemeLinux::GetSize(part); |
| 127 } | 129 } |
| 128 return gfx::Size(width, height); | 130 return gfx::Size(width, height); |
| 129 } | 131 } |
| 130 | 132 |
| 131 void NativeThemeChromeos::PaintTrack(skia::PlatformCanvas* canvas, | 133 void NativeThemeChromeos::PaintTrack(skia::PlatformCanvas* canvas, |
| 132 Part part, State state, | 134 Part part, State state, |
| 133 const ScrollbarTrackExtraParams& extra_params, const gfx::Rect& rect) { | 135 const ScrollbarTrackExtraParams& extra_params, const gfx::Rect& rect) { |
| 134 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 136 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 135 if (part == kScrollbarVerticalTrack) { | 137 if (part == kScrollbarVerticalTrack) { |
| 136 SkBitmap* background = | 138 SkBitmap* background = |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 SkBitmap transposed_bitmap = | 251 SkBitmap transposed_bitmap = |
| 250 SkBitmapOperations::CreateTransposedBtmap(*vertical_bitmap); | 252 SkBitmapOperations::CreateTransposedBtmap(*vertical_bitmap); |
| 251 SkBitmap* horizontal_bitmap = new SkBitmap(transposed_bitmap); | 253 SkBitmap* horizontal_bitmap = new SkBitmap(transposed_bitmap); |
| 252 | 254 |
| 253 horizontal_bitmaps_[resource_id] = horizontal_bitmap; | 255 horizontal_bitmaps_[resource_id] = horizontal_bitmap; |
| 254 return horizontal_bitmap; | 256 return horizontal_bitmap; |
| 255 } | 257 } |
| 256 return NULL; | 258 return NULL; |
| 257 } | 259 } |
| 258 | 260 |
| OLD | NEW |