| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAV_ICON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAVICON_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAV_ICON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAVICON_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "views/widget/widget_gtk.h" | 9 #include "views/widget/widget_gtk.h" |
| 10 | 10 |
| 11 class SkBitmap; | 11 class SkBitmap; |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 class ImageView; | 14 class ImageView; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace chromeos { | 17 namespace chromeos { |
| 18 | 18 |
| 19 class WmOverviewSnapshot; | 19 class WmOverviewSnapshot; |
| 20 | 20 |
| 21 // A single favicon displayed by WmOverviewController. | 21 // A single favicon displayed by WmOverviewController. |
| 22 class WmOverviewFavIcon : public views::WidgetGtk { | 22 class WmOverviewFavicon : public views::WidgetGtk { |
| 23 public: | 23 public: |
| 24 static const int kIconSize; | 24 static const int kIconSize; |
| 25 | 25 |
| 26 WmOverviewFavIcon(); | 26 WmOverviewFavicon(); |
| 27 | 27 |
| 28 // Initializes the favicon to 0x0 size. | 28 // Initializes the favicon to 0x0 size. |
| 29 void Init(WmOverviewSnapshot* snapshot); | 29 void Init(WmOverviewSnapshot* snapshot); |
| 30 | 30 |
| 31 // Setting the favicon sets the bounds to the size of the given | 31 // Setting the favicon sets the bounds to the size of the given |
| 32 // image. | 32 // image. |
| 33 void SetFavicon(const SkBitmap& image); | 33 void SetFavicon(const SkBitmap& image); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // This control is the contents view for this widget. | 36 // This control is the contents view for this widget. |
| 37 views::ImageView* fav_icon_view_; | 37 views::ImageView* favicon_view_; |
| 38 | 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(WmOverviewFavIcon); | 39 DISALLOW_COPY_AND_ASSIGN(WmOverviewFavicon); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace chromeos | 42 } // namespace chromeos |
| 43 | 43 |
| 44 #endif // CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAV_ICON_H_ | 44 #endif // CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAVICON_H_ |
| OLD | NEW |