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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 | 629 |
630 content_size_.SetSize(width, font_list.GetHeight()); | 630 content_size_.SetSize(width, font_list.GetHeight()); |
631 } | 631 } |
632 | 632 |
633 void Combobox::UpdateBorder() { | 633 void Combobox::UpdateBorder() { |
634 scoped_ptr<FocusableBorder> border(new FocusableBorder()); | 634 scoped_ptr<FocusableBorder> border(new FocusableBorder()); |
635 if (style_ == STYLE_ACTION) | 635 if (style_ == STYLE_ACTION) |
636 border->SetInsets(5, 10, 5, 10); | 636 border->SetInsets(5, 10, 5, 10); |
637 if (invalid_) | 637 if (invalid_) |
638 border->SetColor(kWarningColor); | 638 border->SetColor(kWarningColor); |
639 SetBorder(border.PassAs<Border>()); | 639 SetBorder(border.Pass()); |
640 } | 640 } |
641 | 641 |
642 void Combobox::AdjustBoundsForRTLUI(gfx::Rect* rect) const { | 642 void Combobox::AdjustBoundsForRTLUI(gfx::Rect* rect) const { |
643 rect->set_x(GetMirroredXForRect(*rect)); | 643 rect->set_x(GetMirroredXForRect(*rect)); |
644 } | 644 } |
645 | 645 |
646 void Combobox::PaintText(gfx::Canvas* canvas) { | 646 void Combobox::PaintText(gfx::Canvas* canvas) { |
647 gfx::Insets insets = GetInsets(); | 647 gfx::Insets insets = GetInsets(); |
648 insets += gfx::Insets(0, Textfield::kTextPadding, 0, Textfield::kTextPadding); | 648 insets += gfx::Insets(0, Textfield::kTextPadding, 0, Textfield::kTextPadding); |
649 | 649 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 const ui::NativeTheme* native_theme_for_arrow = GetNativeTheme(); | 859 const ui::NativeTheme* native_theme_for_arrow = GetNativeTheme(); |
860 #endif | 860 #endif |
861 | 861 |
862 ui::NativeTheme::ExtraParams ignored; | 862 ui::NativeTheme::ExtraParams ignored; |
863 return native_theme_for_arrow->GetPartSize(ui::NativeTheme::kComboboxArrow, | 863 return native_theme_for_arrow->GetPartSize(ui::NativeTheme::kComboboxArrow, |
864 ui::NativeTheme::kNormal, | 864 ui::NativeTheme::kNormal, |
865 ignored); | 865 ignored); |
866 } | 866 } |
867 | 867 |
868 } // namespace views | 868 } // namespace views |
OLD | NEW |