Chromium Code Reviews| 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 UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_ | 
| 6 #define UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_ | 
| 7 | 7 | 
| 8 #include "base/macros.h" | 8 #include "base/macros.h" | 
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" | 
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 const char* GetClassName() const override; | 56 const char* GetClassName() const override; | 
| 57 | 57 | 
| 58 // Overridden from ImageShadowAnimator::Delegate: | 58 // Overridden from ImageShadowAnimator::Delegate: | 
| 59 void ImageShadowAnimationProgressed(ImageShadowAnimator* animator) override; | 59 void ImageShadowAnimationProgressed(ImageShadowAnimator* animator) override; | 
| 60 | 60 | 
| 61 protected: | 61 protected: | 
| 62 void SetIcon(const gfx::ImageSkia& icon); | 62 void SetIcon(const gfx::ImageSkia& icon); | 
| 63 void SetBadgeIcon(const gfx::ImageSkia& badge_icon); | 63 void SetBadgeIcon(const gfx::ImageSkia& badge_icon); | 
| 64 void SetTitle(const base::string16& title); | 64 void SetTitle(const base::string16& title); | 
| 65 | 65 | 
| 66 void SetPrice(const base::string16& title); | |
| 67 | |
| 
 
xiyuan
2017/06/20 22:19:23
nit: strip empty lines and put the new method in t
 
weidongg
2017/06/22 00:59:16
Done.
 
 | |
| 68 void SetRating(const base::string16& rating); | |
| 69 | |
| 66 private: | 70 private: | 
| 67 void UpdateBackgroundColor(); | 71 void UpdateBackgroundColor(); | 
| 68 | 72 | 
| 69 // Overridden from views::View: | 73 // Overridden from views::View: | 
| 70 gfx::Size CalculatePreferredSize() const override; | 74 gfx::Size CalculatePreferredSize() const override; | 
| 71 bool GetTooltipText(const gfx::Point& p, | 75 bool GetTooltipText(const gfx::Point& p, | 
| 72 base::string16* tooltip) const override; | 76 base::string16* tooltip) const override; | 
| 73 | 77 | 
| 74 SkColor parent_background_color_; | 78 SkColor parent_background_color_; | 
| 75 std::unique_ptr<ImageShadowAnimator> image_shadow_animator_; | 79 std::unique_ptr<ImageShadowAnimator> image_shadow_animator_; | 
| 76 | 80 | 
| 77 views::ImageView* icon_; // Owned by views hierarchy. | 81 views::ImageView* icon_; // Owned by views hierarchy. | 
| 78 views::ImageView* badge_; // Owned by views hierarchy. | 82 views::ImageView* badge_; // Owned by views hierarchy. | 
| 79 views::Label* title_; // Owned by views hierarchy. | 83 views::Label* title_; // Owned by views hierarchy. | 
| 84 views::Label* price_; // Owned by views hierarchy. | |
| 85 views::Label* rating_; // Owned by views hierarchy. | |
| 80 | 86 | 
| 81 bool selected_ = false; | 87 bool selected_ = false; | 
| 82 | 88 | 
| 89 // True if the fullscreen app list feature is enabled. | |
| 90 const bool is_fullscreen_app_list_enabled_; | |
| 91 | |
| 83 DISALLOW_COPY_AND_ASSIGN(TileItemView); | 92 DISALLOW_COPY_AND_ASSIGN(TileItemView); | 
| 84 }; | 93 }; | 
| 85 | 94 | 
| 86 } // namespace app_list | 95 } // namespace app_list | 
| 87 | 96 | 
| 88 #endif // UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_ | 97 #endif // UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_ | 
| OLD | NEW |