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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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/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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 icon_image_side() + badge_spacing() - GetProfileBadgeSize(); 408 icon_image_side() + badge_spacing() - GetProfileBadgeSize();
409 gfx::Vector2d badge_offset_vector = gfx::Vector2d( 409 gfx::Vector2d badge_offset_vector = gfx::Vector2d(
410 GetMirroredXWithWidthInView(badge_offset, GetProfileBadgeSize()), 410 GetMirroredXWithWidthInView(badge_offset, GetProfileBadgeSize()),
411 badge_offset + (switches::IsMaterialDesignUserMenu() 411 badge_offset + (switches::IsMaterialDesignUserMenu()
412 ? views::kRelatedControlSmallVerticalSpacing 412 ? views::kRelatedControlSmallVerticalSpacing
413 : 0)); 413 : 0));
414 414
415 gfx::Point center_point = bounds.CenterPoint() + badge_offset_vector; 415 gfx::Point center_point = bounds.CenterPoint() + badge_offset_vector;
416 416
417 // Paint the circular background. 417 // Paint the circular background.
418 SkPaint paint; 418 CdlPaint paint;
419 paint.setAntiAlias(true); 419 paint.setAntiAlias(true);
420 paint.setColor(GetNativeTheme()->GetSystemColor( 420 paint.setColor(GetNativeTheme()->GetSystemColor(
421 ui::NativeTheme::kColorId_BubbleBackground)); 421 ui::NativeTheme::kColorId_BubbleBackground));
422 canvas->DrawCircle(center_point, GetProfileBadgeSize() / 2, paint); 422 canvas->DrawCircle(center_point, GetProfileBadgeSize() / 2, paint);
423 423
424 gfx::VectorIconId icon_id; 424 gfx::VectorIconId icon_id;
425 int icon_size; 425 int icon_size;
426 SkColor icon_color; 426 SkColor icon_color;
427 if (switches::IsMaterialDesignUserMenu()) { 427 if (switches::IsMaterialDesignUserMenu()) {
428 icon_id = profile_->IsChild() 428 icon_id = profile_->IsChild()
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2311 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2312 IncognitoModePrefs::DISABLED; 2312 IncognitoModePrefs::DISABLED;
2313 return incognito_available && !browser_->profile()->IsGuestSession(); 2313 return incognito_available && !browser_->profile()->IsGuestSession();
2314 } 2314 }
2315 2315
2316 void ProfileChooserView::PostActionPerformed( 2316 void ProfileChooserView::PostActionPerformed(
2317 ProfileMetrics::ProfileDesktopMenu action_performed) { 2317 ProfileMetrics::ProfileDesktopMenu action_performed) {
2318 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 2318 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
2319 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 2319 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
2320 } 2320 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/status_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698