| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/controls/combobox/combobox.h" | 5 #include "ui/views/controls/combobox/combobox.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/accessibility/ax_view_state.h" | 8 #include "ui/accessibility/ax_view_state.h" |
| 9 #include "ui/base/ime/input_method.h" | 9 #include "ui/base/ime/input_method.h" |
| 10 #include "ui/base/models/combobox_model.h" | 10 #include "ui/base/models/combobox_model.h" |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 source_type = ui::MENU_SOURCE_TOUCH; | 679 source_type = ui::MENU_SOURCE_TOUCH; |
| 680 ShowDropDownMenu(source_type); | 680 ShowDropDownMenu(source_type); |
| 681 } | 681 } |
| 682 } | 682 } |
| 683 | 683 |
| 684 void Combobox::UpdateBorder() { | 684 void Combobox::UpdateBorder() { |
| 685 scoped_ptr<FocusableBorder> border(new FocusableBorder()); | 685 scoped_ptr<FocusableBorder> border(new FocusableBorder()); |
| 686 if (style_ == STYLE_ACTION) | 686 if (style_ == STYLE_ACTION) |
| 687 border->SetInsets(5, 10, 5, 10); | 687 border->SetInsets(5, 10, 5, 10); |
| 688 if (invalid_) | 688 if (invalid_) |
| 689 border->SetColor(gfx::kErrorRed); | 689 border->SetColor(gfx::kGoogleRed700); |
| 690 SetBorder(border.Pass()); | 690 SetBorder(border.Pass()); |
| 691 } | 691 } |
| 692 | 692 |
| 693 void Combobox::AdjustBoundsForRTLUI(gfx::Rect* rect) const { | 693 void Combobox::AdjustBoundsForRTLUI(gfx::Rect* rect) const { |
| 694 rect->set_x(GetMirroredXForRect(*rect)); | 694 rect->set_x(GetMirroredXForRect(*rect)); |
| 695 } | 695 } |
| 696 | 696 |
| 697 void Combobox::PaintText(gfx::Canvas* canvas) { | 697 void Combobox::PaintText(gfx::Canvas* canvas) { |
| 698 gfx::Insets insets = GetInsets(); | 698 gfx::Insets insets = GetInsets(); |
| 699 insets += gfx::Insets(0, Textfield::kTextPadding, 0, Textfield::kTextPadding); | 699 insets += gfx::Insets(0, Textfield::kTextPadding, 0, Textfield::kTextPadding); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 return gfx::Size(width, font_list.GetHeight()); | 920 return gfx::Size(width, font_list.GetHeight()); |
| 921 } | 921 } |
| 922 | 922 |
| 923 PrefixSelector* Combobox::GetPrefixSelector() { | 923 PrefixSelector* Combobox::GetPrefixSelector() { |
| 924 if (!selector_) | 924 if (!selector_) |
| 925 selector_.reset(new PrefixSelector(this)); | 925 selector_.reset(new PrefixSelector(this)); |
| 926 return selector_.get(); | 926 return selector_.get(); |
| 927 } | 927 } |
| 928 | 928 |
| 929 } // namespace views | 929 } // namespace views |
| OLD | NEW |