summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/wm_overview_fav_icon.h
blob: d4b4427c44137ddd510e2c7d9adeb893b9d0afff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAV_ICON_H_
#define CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAV_ICON_H_
#pragma once

#include "views/widget/widget_gtk.h"

class SkBitmap;

namespace views {
class ImageView;
}

namespace chromeos {

class WmOverviewSnapshot;

// A single fav icon displayed by WmOverviewController.
class WmOverviewFavIcon : public views::WidgetGtk {
 public:
  static const int kIconSize;

  WmOverviewFavIcon();

  // Initializes the fav icon to 0x0 size.
  void Init(WmOverviewSnapshot* snapshot);

  // Setting the FavIcon sets the bounds to the size of the given
  // image.
  void SetFavIcon(const SkBitmap& image);

 private:
  // This control is the contents view for this widget.
  views::ImageView* fav_icon_view_;

  DISALLOW_COPY_AND_ASSIGN(WmOverviewFavIcon);
};

}  // namespace chromeos

#endif  // CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAV_ICON_H_