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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 10 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/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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 icon_image_side() + badge_spacing() - GetProfileBadgeSize(); 406 icon_image_side() + badge_spacing() - GetProfileBadgeSize();
407 gfx::Vector2d badge_offset_vector = gfx::Vector2d( 407 gfx::Vector2d badge_offset_vector = gfx::Vector2d(
408 GetMirroredXWithWidthInView(badge_offset, GetProfileBadgeSize()), 408 GetMirroredXWithWidthInView(badge_offset, GetProfileBadgeSize()),
409 badge_offset + (switches::IsMaterialDesignUserMenu() 409 badge_offset + (switches::IsMaterialDesignUserMenu()
410 ? views::kRelatedControlSmallVerticalSpacing 410 ? views::kRelatedControlSmallVerticalSpacing
411 : 0)); 411 : 0));
412 412
413 gfx::Point center_point = bounds.CenterPoint() + badge_offset_vector; 413 gfx::Point center_point = bounds.CenterPoint() + badge_offset_vector;
414 414
415 // Paint the circular background. 415 // Paint the circular background.
416 SkPaint paint; 416 cc::PaintFlags paint;
417 paint.setAntiAlias(true); 417 paint.setAntiAlias(true);
418 paint.setColor(GetNativeTheme()->GetSystemColor( 418 paint.setColor(GetNativeTheme()->GetSystemColor(
419 ui::NativeTheme::kColorId_BubbleBackground)); 419 ui::NativeTheme::kColorId_BubbleBackground));
420 canvas->DrawCircle(center_point, GetProfileBadgeSize() / 2, paint); 420 canvas->DrawCircle(center_point, GetProfileBadgeSize() / 2, paint);
421 421
422 gfx::VectorIconId icon_id; 422 gfx::VectorIconId icon_id;
423 int icon_size; 423 int icon_size;
424 SkColor icon_color; 424 SkColor icon_color;
425 if (switches::IsMaterialDesignUserMenu()) { 425 if (switches::IsMaterialDesignUserMenu()) {
426 icon_id = profile_->IsChild() 426 icon_id = profile_->IsChild()
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2304 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2305 IncognitoModePrefs::DISABLED; 2305 IncognitoModePrefs::DISABLED;
2306 return incognito_available && !browser_->profile()->IsGuestSession(); 2306 return incognito_available && !browser_->profile()->IsGuestSession();
2307 } 2307 }
2308 2308
2309 void ProfileChooserView::PostActionPerformed( 2309 void ProfileChooserView::PostActionPerformed(
2310 ProfileMetrics::ProfileDesktopMenu action_performed) { 2310 ProfileMetrics::ProfileDesktopMenu action_performed) {
2311 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 2311 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
2312 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 2312 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
2313 } 2313 }
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