| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |