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

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

Issue 2533123002: Fix GN missing headers in //base (Closed)
Patch Set: remove dependency on check_gn_headers Created 3 years, 11 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> 7 #include <utility>
8 8
9 #include "base/win/windows_version.h"
10 #include "build/build_config.h" 9 #include "build/build_config.h"
11 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/profiles/profile_attributes_entry.h" 11 #include "chrome/browser/profiles/profile_attributes_entry.h"
13 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/profiles/profiles_state.h" 13 #include "chrome/browser/profiles/profiles_state.h"
15 #include "chrome/browser/ui/views/profiles/avatar_button_delegate.h" 14 #include "chrome/browser/ui/views/profiles/avatar_button_delegate.h"
16 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" 15 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
17 #include "chrome/grit/theme_resources.h" 16 #include "chrome/grit/theme_resources.h"
18 #include "components/signin/core/common/profile_management_switches.h" 17 #include "components/signin/core/common/profile_management_switches.h"
19 #include "ui/base/resource/resource_bundle.h" 18 #include "ui/base/resource/resource_bundle.h"
20 #include "ui/gfx/canvas.h" 19 #include "ui/gfx/canvas.h"
21 #include "ui/gfx/color_palette.h" 20 #include "ui/gfx/color_palette.h"
22 #include "ui/gfx/geometry/vector2d.h" 21 #include "ui/gfx/geometry/vector2d.h"
23 #include "ui/gfx/paint_vector_icon.h" 22 #include "ui/gfx/paint_vector_icon.h"
24 #include "ui/gfx/vector_icons_public.h" 23 #include "ui/gfx/vector_icons_public.h"
25 #include "ui/views/border.h" 24 #include "ui/views/border.h"
26 #include "ui/views/controls/button/label_button_border.h" 25 #include "ui/views/controls/button/label_button_border.h"
27 #include "ui/views/painter.h" 26 #include "ui/views/painter.h"
28 27
28 #if defined(OS_WIN)
29 #include "base/win/windows_version.h"
30 #endif
31
29 namespace { 32 namespace {
30 33
31 std::unique_ptr<views::Border> CreateBorder(const int normal_image_set[], 34 std::unique_ptr<views::Border> CreateBorder(const int normal_image_set[],
32 const int hot_image_set[], 35 const int hot_image_set[],
33 const int pushed_image_set[]) { 36 const int pushed_image_set[]) {
34 std::unique_ptr<views::LabelButtonAssetBorder> border( 37 std::unique_ptr<views::LabelButtonAssetBorder> border(
35 new views::LabelButtonAssetBorder(views::Button::STYLE_TEXTBUTTON)); 38 new views::LabelButtonAssetBorder(views::Button::STYLE_TEXTBUTTON));
36 border->SetPainter(false, views::Button::STATE_NORMAL, 39 border->SetPainter(false, views::Button::STATE_NORMAL,
37 views::Painter::CreateImageGridPainter(normal_image_set)); 40 views::Painter::CreateImageGridPainter(normal_image_set));
38 border->SetPainter(false, views::Button::STATE_HOVERED, 41 border->SetPainter(false, views::Button::STATE_HOVERED,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 214 }
212 215
213 // If we are not using the generic button, then reset the spacing between 216 // If we are not using the generic button, then reset the spacing between
214 // the text and the possible authentication error icon. 217 // the text and the possible authentication error icon.
215 const int kDefaultImageTextSpacing = 5; 218 const int kDefaultImageTextSpacing = 5;
216 SetImageLabelSpacing(use_generic_button ? 0 : kDefaultImageTextSpacing); 219 SetImageLabelSpacing(use_generic_button ? 0 : kDefaultImageTextSpacing);
217 220
218 PreferredSizeChanged(); 221 PreferredSizeChanged();
219 delegate_->ButtonPreferredSizeChanged(); 222 delegate_->ButtonPreferredSizeChanged();
220 } 223 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/create_application_shortcut_view.cc ('k') | chrome/common/chrome_paths.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698