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

Side by Side Diff: chrome/browser/ui/views/profiles/new_avatar_button.cc

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/views/profiles/new_avatar_button.h" 5 #include "chrome/browser/ui/views/profiles/new_avatar_button.h"
6 6
7 #include <utility>
8
7 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
8 #include "build/build_config.h" 10 #include "build/build_config.h"
9 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
11 #include "chrome/browser/profiles/profiles_state.h" 13 #include "chrome/browser/profiles/profiles_state.h"
12 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" 15 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
14 #include "grit/theme_resources.h" 16 #include "grit/theme_resources.h"
15 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
16 #include "ui/gfx/canvas.h" 18 #include "ui/gfx/canvas.h"
(...skipping 18 matching lines...) Expand all
35 views::Painter::CreateImageGridPainter(hot_image_set)); 37 views::Painter::CreateImageGridPainter(hot_image_set));
36 border->SetPainter(false, views::Button::STATE_PRESSED, 38 border->SetPainter(false, views::Button::STATE_PRESSED,
37 views::Painter::CreateImageGridPainter(pushed_image_set)); 39 views::Painter::CreateImageGridPainter(pushed_image_set));
38 40
39 const int kLeftRightInset = 8; 41 const int kLeftRightInset = 8;
40 const int kTopInset = 2; 42 const int kTopInset = 2;
41 const int kBottomInset = 4; 43 const int kBottomInset = 4;
42 border->set_insets(gfx::Insets(kTopInset, kLeftRightInset, 44 border->set_insets(gfx::Insets(kTopInset, kLeftRightInset,
43 kBottomInset, kLeftRightInset)); 45 kBottomInset, kLeftRightInset));
44 46
45 return border.Pass(); 47 return std::move(border);
46 } 48 }
47 49
48 } // namespace 50 } // namespace
49 51
50 NewAvatarButton::NewAvatarButton(views::ButtonListener* listener, 52 NewAvatarButton::NewAvatarButton(views::ButtonListener* listener,
51 AvatarButtonStyle button_style, 53 AvatarButtonStyle button_style,
52 Browser* browser) 54 Browser* browser)
53 : LabelButton(listener, base::string16()), 55 : LabelButton(listener, base::string16()),
54 browser_(browser), 56 browser_(browser),
55 has_auth_error_(false), 57 has_auth_error_(false),
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 SetImage(views::Button::STATE_NORMAL, gfx::ImageSkia()); 219 SetImage(views::Button::STATE_NORMAL, gfx::ImageSkia());
218 } 220 }
219 221
220 // If we are not using the generic button, then reset the spacing between 222 // If we are not using the generic button, then reset the spacing between
221 // the text and the possible authentication error icon. 223 // the text and the possible authentication error icon.
222 const int kDefaultImageTextSpacing = 5; 224 const int kDefaultImageTextSpacing = 5;
223 SetImageLabelSpacing(use_generic_button ? 0 : kDefaultImageTextSpacing); 225 SetImageLabelSpacing(use_generic_button ? 0 : kDefaultImageTextSpacing);
224 226
225 PreferredSizeChanged(); 227 PreferredSizeChanged();
226 } 228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698