| 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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" | 
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" | 
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" | 
| 10 #include "chrome/browser/lifetime/application_lifetime.h" | 10 #include "chrome/browser/lifetime/application_lifetime.h" | 
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 228     } | 228     } | 
| 229 | 229 | 
| 230     set_notify_enter_exit_on_child(true); | 230     set_notify_enter_exit_on_child(true); | 
| 231 | 231 | 
| 232     // Photo overlay that appears when hovering over the button. | 232     // Photo overlay that appears when hovering over the button. | 
| 233     photo_overlay_ = new views::ImageView(); | 233     photo_overlay_ = new views::ImageView(); | 
| 234 | 234 | 
| 235     const SkColor kBackgroundColor = SkColorSetARGB(65, 255, 255, 255); | 235     const SkColor kBackgroundColor = SkColorSetARGB(65, 255, 255, 255); | 
| 236     photo_overlay_->set_background( | 236     photo_overlay_->set_background( | 
| 237         views::Background::CreateSolidBackground(kBackgroundColor)); | 237         views::Background::CreateSolidBackground(kBackgroundColor)); | 
| 238     photo_overlay_->SetImage(*ui::ResourceBundle::GetSharedInstance(). | 238     photo_overlay_->SetVectorIcon(gfx::VectorIconId::PHOTO_CAMERA, | 
| 239         GetImageSkiaNamed(IDR_ICON_PROFILES_EDIT_CAMERA)); | 239                                   SkColorSetRGB(0x33, 0x33, 0x33), | 
|  | 240                                   gfx::Size(48, 48)); | 
| 240 | 241 | 
| 241     photo_overlay_->SetSize(bounds.size()); | 242     photo_overlay_->SetSize(bounds.size()); | 
| 242     photo_overlay_->SetVisible(false); | 243     photo_overlay_->SetVisible(false); | 
| 243     AddChildView(photo_overlay_); | 244     AddChildView(photo_overlay_); | 
| 244   } | 245   } | 
| 245 | 246 | 
| 246   void OnPaint(gfx::Canvas* canvas) override { | 247   void OnPaint(gfx::Canvas* canvas) override { | 
| 247     // Display the profile picture as a circle. | 248     // Display the profile picture as a circle. | 
| 248     canvas->ClipPath(circular_mask_, true); | 249     canvas->ClipPath(circular_mask_, true); | 
| 249     views::LabelButton::OnPaint(canvas); | 250     views::LabelButton::OnPaint(canvas); | 
| (...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1747       IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 1748       IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 
| 1748           IncognitoModePrefs::DISABLED; | 1749           IncognitoModePrefs::DISABLED; | 
| 1749   return incognito_available && !browser_->profile()->IsGuestSession(); | 1750   return incognito_available && !browser_->profile()->IsGuestSession(); | 
| 1750 } | 1751 } | 
| 1751 | 1752 | 
| 1752 void ProfileChooserView::PostActionPerformed( | 1753 void ProfileChooserView::PostActionPerformed( | 
| 1753     ProfileMetrics::ProfileDesktopMenu action_performed) { | 1754     ProfileMetrics::ProfileDesktopMenu action_performed) { | 
| 1754   ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 1755   ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 
| 1755   gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 1756   gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 
| 1756 } | 1757 } | 
| OLD | NEW | 
|---|