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

Side by Side Diff: views/controls/separator.cc

Issue 8405002: ui/gfx: Convert Canvas::FillRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: save some vertical space, interactive_ui_tests are fixed by Peter's fix 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 | « views/controls/native/native_view_host.cc ('k') | views/desktop/desktop_background.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/separator.h" 5 #include "views/controls/separator.h"
6 6
7 #include "ui/base/accessibility/accessible_view_state.h" 7 #include "ui/base/accessibility/accessible_view_state.h"
8 #include "ui/gfx/canvas.h" 8 #include "ui/gfx/canvas.h"
9 9
10 namespace views { 10 namespace views {
(...skipping 19 matching lines...) Expand all
30 30
31 gfx::Size Separator::GetPreferredSize() { 31 gfx::Size Separator::GetPreferredSize() {
32 return gfx::Size(width(), kSeparatorHeight); 32 return gfx::Size(width(), kSeparatorHeight);
33 } 33 }
34 34
35 void Separator::GetAccessibleState(ui::AccessibleViewState* state) { 35 void Separator::GetAccessibleState(ui::AccessibleViewState* state) {
36 state->role = ui::AccessibilityTypes::ROLE_SEPARATOR; 36 state->role = ui::AccessibilityTypes::ROLE_SEPARATOR;
37 } 37 }
38 38
39 void Separator::Paint(gfx::Canvas* canvas) { 39 void Separator::Paint(gfx::Canvas* canvas) {
40 canvas->FillRectInt(kDefaultColor, x(), y(), width(), height()); 40 canvas->FillRect(kDefaultColor, bounds());
41 } 41 }
42 42
43 std::string Separator::GetClassName() const { 43 std::string Separator::GetClassName() const {
44 return kViewClassName; 44 return kViewClassName;
45 } 45 }
46 46
47 } // namespace views 47 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/native/native_view_host.cc ('k') | views/desktop/desktop_background.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698