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

Side by Side Diff: ui/gfx/native_theme_chromeos.cc

Issue 8669002: More TOUCH_UI hacks and constant removal. And TODO(saintlou) cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/native_theme_base.cc ('k') | views/controls/focusable_border.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/gfx/native_theme_base.cc ('k') | views/controls/focusable_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698