• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAVICON_H_
6 #define CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAVICON_H_
7 #pragma once
8 
9 #include "views/widget/widget_gtk.h"
10 
11 class SkBitmap;
12 
13 namespace views {
14 class ImageView;
15 }
16 
17 namespace chromeos {
18 
19 class WmOverviewSnapshot;
20 
21 // A single favicon displayed by WmOverviewController.
22 class WmOverviewFavicon : public views::WidgetGtk {
23  public:
24   static const int kIconSize;
25 
26   WmOverviewFavicon();
27 
28   // Initializes the favicon to 0x0 size.
29   void Init(WmOverviewSnapshot* snapshot);
30 
31   // Setting the favicon sets the bounds to the size of the given
32   // image.
33   void SetFavicon(const SkBitmap& image);
34 
35  private:
36   // This control is the contents view for this widget.
37   views::ImageView* favicon_view_;
38 
39   DISALLOW_COPY_AND_ASSIGN(WmOverviewFavicon);
40 };
41 
42 }  // namespace chromeos
43 
44 #endif  // CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAVICON_H_
45