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

Unified Diff: ash/common/system/user/rounded_image_view.h

Issue 2780963002: ash: Fix system tray avatar not updated regression (Closed)
Patch Set: add a test Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/tray/system_tray_notifier.cc ('k') | ash/common/system/user/rounded_image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/user/rounded_image_view.h
diff --git a/ash/common/system/user/rounded_image_view.h b/ash/common/system/user/rounded_image_view.h
index c424777dc551877010cbd9d0120d69365eb40f1a..e8b266bd426509d1f635a192fe7c474588a45869 100644
--- a/ash/common/system/user/rounded_image_view.h
+++ b/ash/common/system/user/rounded_image_view.h
@@ -23,7 +23,7 @@ class RoundedImageView : public views::View {
// Set the image that should be displayed. The image contents is copied to the
// receiver's image.
- void SetImage(const gfx::ImageSkia& img, const gfx::Size& size);
+ void SetImage(const gfx::ImageSkia& image, const gfx::Size& size);
// Set the radii of the corners independently.
void SetCornerRadii(int top_left,
@@ -35,8 +35,10 @@ class RoundedImageView : public views::View {
gfx::Size GetPreferredSize() const override;
void OnPaint(gfx::Canvas* canvas) override;
+ // Gets the image painted by RoundedImageView for test.
+ const gfx::ImageSkia& image_for_test() const { return resized_; }
+
private:
- gfx::ImageSkia image_;
xiyuan 2017/03/29 20:45:30 No need to hold |image_| since the ImageSkiaSource
gfx::ImageSkia resized_;
James Cook 2017/03/29 20:55:20 optional: This might be a little better as |resize
xiyuan 2017/03/29 21:02:43 Done.
gfx::Size image_size_;
int corner_radius_[4];
« no previous file with comments | « ash/common/system/tray/system_tray_notifier.cc ('k') | ash/common/system/user/rounded_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698