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

Side by Side Diff: views/controls/textfield/native_textfield_views.cc

Issue 6879013: skia::PlatformCanvas is being deprecated. Going forward we will use gfx::Canvas wherever we need ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « views/controls/table/table_view.cc ('k') | views/controls/tree/tree_view.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 "views/controls/textfield/native_textfield_views.h" 5 #include "views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 }; 982 };
983 SkPath path; 983 SkPath path;
984 path.addRoundRect(rect, corners); 984 path.addRoundRect(rect, corners);
985 SkPaint paint; 985 SkPaint paint;
986 paint.setStyle(SkPaint::kStroke_Style); 986 paint.setStyle(SkPaint::kStroke_Style);
987 paint.setFlags(SkPaint::kAntiAlias_Flag); 987 paint.setFlags(SkPaint::kAntiAlias_Flag);
988 // TODO(oshima): Copy what WebKit does for focused border. 988 // TODO(oshima): Copy what WebKit does for focused border.
989 paint.setColor(has_focus_ ? kFocusedBorderColor : kDefaultBorderColor); 989 paint.setColor(has_focus_ ? kFocusedBorderColor : kDefaultBorderColor);
990 paint.setStrokeWidth(SkIntToScalar(has_focus_ ? 2 : 1)); 990 paint.setStrokeWidth(SkIntToScalar(has_focus_ ? 2 : 1));
991 991
992 canvas->AsCanvasSkia()->drawPath(path, paint); 992 canvas->AsCanvasSkia()->skia_canvas()->drawPath(path, paint);
993 } 993 }
994 994
995 void NativeTextfieldViews::TextfieldBorder::GetInsets(gfx::Insets* insets) const 995 void NativeTextfieldViews::TextfieldBorder::GetInsets(gfx::Insets* insets) const
996 { 996 {
997 *insets = insets_; 997 *insets = insets_;
998 } 998 }
999 999
1000 void NativeTextfieldViews::TextfieldBorder::SetInsets(int top, 1000 void NativeTextfieldViews::TextfieldBorder::SetInsets(int top,
1001 int left, 1001 int left,
1002 int bottom, 1002 int bottom,
1003 int right) { 1003 int right) {
1004 insets_.Set(top, left, bottom, right); 1004 insets_.Set(top, left, bottom, right);
1005 } 1005 }
1006 1006
1007 } // namespace views 1007 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/table/table_view.cc ('k') | views/controls/tree/tree_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698