| 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 #ifndef ASH_SYSTEM_USER_ROUNDED_IMAGE_VIEW_H_ | 5 #ifndef ASH_SYSTEM_USER_ROUNDED_IMAGE_VIEW_H_ |
| 6 #define ASH_SYSTEM_USER_ROUNDED_IMAGE_VIEW_H_ | 6 #define ASH_SYSTEM_USER_ROUNDED_IMAGE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
| 10 #include "ui/gfx/image/image_skia.h" | 10 #include "ui/gfx/image/image_skia.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 void SetImage(const gfx::ImageSkia& img, const gfx::Size& size); | 27 void SetImage(const gfx::ImageSkia& img, const gfx::Size& size); |
| 28 | 28 |
| 29 // Set the radii of the corners independently. | 29 // Set the radii of the corners independently. |
| 30 void SetCornerRadii(int top_left, | 30 void SetCornerRadii(int top_left, |
| 31 int top_right, | 31 int top_right, |
| 32 int bottom_right, | 32 int bottom_right, |
| 33 int bottom_left); | 33 int bottom_left); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // Overridden from views::View. | 36 // Overridden from views::View. |
| 37 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 37 virtual gfx::Size GetPreferredSize() const override; |
| 38 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 38 virtual void OnPaint(gfx::Canvas* canvas) override; |
| 39 | 39 |
| 40 gfx::ImageSkia image_; | 40 gfx::ImageSkia image_; |
| 41 gfx::ImageSkia resized_; | 41 gfx::ImageSkia resized_; |
| 42 gfx::Size image_size_; | 42 gfx::Size image_size_; |
| 43 int corner_radius_[4]; | 43 int corner_radius_[4]; |
| 44 | 44 |
| 45 // True if the given user is the active user and the icon should get | 45 // True if the given user is the active user and the icon should get |
| 46 // painted as active. | 46 // painted as active. |
| 47 bool active_user_; | 47 bool active_user_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(RoundedImageView); | 49 DISALLOW_COPY_AND_ASSIGN(RoundedImageView); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace tray | 52 } // namespace tray |
| 53 } // namespace ash | 53 } // namespace ash |
| 54 | 54 |
| 55 #endif // ASH_SYSTEM_USER_ROUNDED_IMAGE_VIEW_H_ | 55 #endif // ASH_SYSTEM_USER_ROUNDED_IMAGE_VIEW_H_ |
| OLD | NEW |