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

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

Issue 1432443004: Remove SkDevice and SkBaseDevice outside skia/ext/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass SkPixmap by pointer to MakeBitmapOpaque Created 5 years, 1 month 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 | « cc/output/software_renderer.cc ('k') | components/html_viewer/html_frame.cc » ('j') | no next file with comments »
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/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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 ProfileBadge(gfx::VectorIconId id, size_t icon_size) 551 ProfileBadge(gfx::VectorIconId id, size_t icon_size)
552 : CanvasImageSource(gfx::Size(kProfileBadgeSize, kProfileBadgeSize), 552 : CanvasImageSource(gfx::Size(kProfileBadgeSize, kProfileBadgeSize),
553 false), 553 false),
554 id_(id), 554 id_(id),
555 icon_size_(icon_size) {} 555 icon_size_(icon_size) {}
556 556
557 ~ProfileBadge() override {} 557 ~ProfileBadge() override {}
558 558
559 // CanvasImageSource: 559 // CanvasImageSource:
560 void Draw(gfx::Canvas* canvas) override { 560 void Draw(gfx::Canvas* canvas) override {
561 const SkISize size = canvas->sk_canvas()->getDeviceSize(); 561 const SkISize size = canvas->sk_canvas()->getBaseLayerSize();
562 gfx::Rect bounds(0, 0, size.width(), size.height()); 562 gfx::Rect bounds(0, 0, size.width(), size.height());
563 563
564 SkPaint paint; 564 SkPaint paint;
565 paint.setAntiAlias(true); 565 paint.setAntiAlias(true);
566 paint.setColor(SK_ColorWHITE); 566 paint.setColor(SK_ColorWHITE);
567 canvas->DrawCircle(bounds.CenterPoint(), size.width() / 2, paint); 567 canvas->DrawCircle(bounds.CenterPoint(), size.width() / 2, paint);
568 568
569 paint.setColor(SkColorSetRGB(0xAF, 0xD9, 0xFC)); 569 paint.setColor(SkColorSetRGB(0xAF, 0xD9, 0xFC));
570 canvas->DrawCircle(bounds.CenterPoint(), 570 canvas->DrawCircle(bounds.CenterPoint(),
571 size.width() / 2 - kProfileBadgeWhitePadding, paint); 571 size.width() / 2 - kProfileBadgeWhitePadding, paint);
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 1870 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
1871 IncognitoModePrefs::DISABLED; 1871 IncognitoModePrefs::DISABLED;
1872 return incognito_available && !browser_->profile()->IsGuestSession(); 1872 return incognito_available && !browser_->profile()->IsGuestSession();
1873 } 1873 }
1874 1874
1875 void ProfileChooserView::PostActionPerformed( 1875 void ProfileChooserView::PostActionPerformed(
1876 ProfileMetrics::ProfileDesktopMenu action_performed) { 1876 ProfileMetrics::ProfileDesktopMenu action_performed) {
1877 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 1877 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
1878 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 1878 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
1879 } 1879 }
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | components/html_viewer/html_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698