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

Side by Side Diff: ui/views/controls/combobox/combobox.cc

Issue 659713003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 years, 2 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
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/touchui/touch_editing_menu.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) 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
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
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
OLDNEW
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/touchui/touch_editing_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698