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

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

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/controls/image_view.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 <utility>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "ui/accessibility/ax_view_state.h" 10 #include "ui/accessibility/ax_view_state.h"
9 #include "ui/base/ime/input_method.h" 11 #include "ui/base/ime/input_method.h"
10 #include "ui/base/models/combobox_model.h" 12 #include "ui/base/models/combobox_model.h"
11 #include "ui/base/models/combobox_model_observer.h" 13 #include "ui/base/models/combobox_model_observer.h"
12 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/events/event.h" 15 #include "ui/events/event.h"
14 #include "ui/gfx/animation/throb_animation.h" 16 #include "ui/gfx/animation/throb_animation.h"
15 #include "ui/gfx/canvas.h" 17 #include "ui/gfx/canvas.h"
16 #include "ui/gfx/color_palette.h" 18 #include "ui/gfx/color_palette.h"
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 ShowDropDownMenu(source_type); 682 ShowDropDownMenu(source_type);
681 } 683 }
682 } 684 }
683 685
684 void Combobox::UpdateBorder() { 686 void Combobox::UpdateBorder() {
685 scoped_ptr<FocusableBorder> border(new FocusableBorder()); 687 scoped_ptr<FocusableBorder> border(new FocusableBorder());
686 if (style_ == STYLE_ACTION) 688 if (style_ == STYLE_ACTION)
687 border->SetInsets(5, 10, 5, 10); 689 border->SetInsets(5, 10, 5, 10);
688 if (invalid_) 690 if (invalid_)
689 border->SetColor(gfx::kGoogleRed700); 691 border->SetColor(gfx::kGoogleRed700);
690 SetBorder(border.Pass()); 692 SetBorder(std::move(border));
691 } 693 }
692 694
693 void Combobox::AdjustBoundsForRTLUI(gfx::Rect* rect) const { 695 void Combobox::AdjustBoundsForRTLUI(gfx::Rect* rect) const {
694 rect->set_x(GetMirroredXForRect(*rect)); 696 rect->set_x(GetMirroredXForRect(*rect));
695 } 697 }
696 698
697 void Combobox::PaintText(gfx::Canvas* canvas) { 699 void Combobox::PaintText(gfx::Canvas* canvas) {
698 gfx::Insets insets = GetInsets(); 700 gfx::Insets insets = GetInsets();
699 insets += gfx::Insets(0, Textfield::kTextPadding, 0, Textfield::kTextPadding); 701 insets += gfx::Insets(0, Textfield::kTextPadding, 0, Textfield::kTextPadding);
700 702
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 return gfx::Size(width, font_list.GetHeight()); 922 return gfx::Size(width, font_list.GetHeight());
921 } 923 }
922 924
923 PrefixSelector* Combobox::GetPrefixSelector() { 925 PrefixSelector* Combobox::GetPrefixSelector() {
924 if (!selector_) 926 if (!selector_)
925 selector_.reset(new PrefixSelector(this)); 927 selector_.reset(new PrefixSelector(this));
926 return selector_.get(); 928 return selector_.get();
927 } 929 }
928 930
929 } // namespace views 931 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698