| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHELF_SHELF_BUTTON_H_ | 5 #ifndef ASH_SHELF_SHELF_BUTTON_H_ |
| 6 #define ASH_SHELF_SHELF_BUTTON_H_ | 6 #define ASH_SHELF_SHELF_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ui/gfx/shadow_value.h" | 9 #include "ui/gfx/shadow_value.h" |
| 10 #include "ui/views/controls/button/custom_button.h" | 10 #include "ui/views/controls/button/custom_button.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // implementation, by overriding CreateIconView(). | 76 // implementation, by overriding CreateIconView(). |
| 77 class IconView : public views::ImageView { | 77 class IconView : public views::ImageView { |
| 78 public: | 78 public: |
| 79 IconView(); | 79 IconView(); |
| 80 virtual ~IconView(); | 80 virtual ~IconView(); |
| 81 | 81 |
| 82 void set_icon_size(int icon_size) { icon_size_ = icon_size; } | 82 void set_icon_size(int icon_size) { icon_size_ = icon_size; } |
| 83 int icon_size() const { return icon_size_; } | 83 int icon_size() const { return icon_size_; } |
| 84 | 84 |
| 85 // views::View overrides. | 85 // views::View overrides. |
| 86 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; | 86 virtual bool HitTestRect(const gfx::RectF& rect) const OVERRIDE; |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 // Set to non-zero to force icons to be resized to fit within a square, | 89 // Set to non-zero to force icons to be resized to fit within a square, |
| 90 // while maintaining original proportions. | 90 // while maintaining original proportions. |
| 91 int icon_size_; | 91 int icon_size_; |
| 92 | 92 |
| 93 DISALLOW_COPY_AND_ASSIGN(IconView); | 93 DISALLOW_COPY_AND_ASSIGN(IconView); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 // View overrides: | 96 // View overrides: |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // If non-null the destuctor sets this to true. This is set while the menu is | 148 // If non-null the destuctor sets this to true. This is set while the menu is |
| 149 // showing and used to detect if the menu was deleted while running. | 149 // showing and used to detect if the menu was deleted while running. |
| 150 bool* destroyed_flag_; | 150 bool* destroyed_flag_; |
| 151 | 151 |
| 152 DISALLOW_COPY_AND_ASSIGN(ShelfButton); | 152 DISALLOW_COPY_AND_ASSIGN(ShelfButton); |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 } // namespace ash | 155 } // namespace ash |
| 156 | 156 |
| 157 #endif // ASH_SHELF_SHELF_BUTTON_H_ | 157 #endif // ASH_SHELF_SHELF_BUTTON_H_ |
| OLD | NEW |