| 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 "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 Loading... |
| 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 |
| OLD | NEW |