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

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

Issue 2255403002: Use int rather than size_t to pass DIP amounts to vector icon functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 | « no previous file | ui/gfx/paint_vector_icon.h » ('j') | ui/views/examples/vector_example.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/profile_chooser_view.h" 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/metrics/user_metrics.h" 8 #include "base/metrics/user_metrics.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 gfx::Point center_point = bounds.CenterPoint() + badge_offset_vector; 431 gfx::Point center_point = bounds.CenterPoint() + badge_offset_vector;
432 432
433 // Paint the circular background. 433 // Paint the circular background.
434 SkPaint paint; 434 SkPaint paint;
435 paint.setAntiAlias(true); 435 paint.setAntiAlias(true);
436 paint.setColor(GetNativeTheme()->GetSystemColor( 436 paint.setColor(GetNativeTheme()->GetSystemColor(
437 ui::NativeTheme::kColorId_BubbleBackground)); 437 ui::NativeTheme::kColorId_BubbleBackground));
438 canvas->DrawCircle(center_point, GetProfileBadgeSize() / 2, paint); 438 canvas->DrawCircle(center_point, GetProfileBadgeSize() / 2, paint);
439 439
440 gfx::VectorIconId icon_id; 440 gfx::VectorIconId icon_id;
441 size_t icon_size; 441 int icon_size;
442 SkColor icon_color; 442 SkColor icon_color;
443 if (switches::IsMaterialDesignUserMenu()) { 443 if (switches::IsMaterialDesignUserMenu()) {
444 icon_id = profile_->IsChild() 444 icon_id = profile_->IsChild()
445 ? gfx::VectorIconId::ACCOUNT_CHILD_CIRCLE 445 ? gfx::VectorIconId::ACCOUNT_CHILD_CIRCLE
446 : gfx::VectorIconId::SUPERVISOR_ACCOUNT_CIRCLE; 446 : gfx::VectorIconId::SUPERVISOR_ACCOUNT_CIRCLE;
447 icon_size = 22; 447 icon_size = 22;
448 icon_color = gfx::kChromeIconGrey; 448 icon_color = gfx::kChromeIconGrey;
449 } else { 449 } else {
450 // Paint the light blue circle. 450 // Paint the light blue circle.
451 paint.setColor(SkColorSetRGB(0xaf, 0xd9, 0xfc)); 451 paint.setColor(SkColorSetRGB(0xaf, 0xd9, 0xfc));
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
2303 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2303 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2304 IncognitoModePrefs::DISABLED; 2304 IncognitoModePrefs::DISABLED;
2305 return incognito_available && !browser_->profile()->IsGuestSession(); 2305 return incognito_available && !browser_->profile()->IsGuestSession();
2306 } 2306 }
2307 2307
2308 void ProfileChooserView::PostActionPerformed( 2308 void ProfileChooserView::PostActionPerformed(
2309 ProfileMetrics::ProfileDesktopMenu action_performed) { 2309 ProfileMetrics::ProfileDesktopMenu action_performed) {
2310 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 2310 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
2311 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 2311 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
2312 } 2312 }
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/paint_vector_icon.h » ('j') | ui/views/examples/vector_example.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698