Workaround for xkbcommon dead keys.
[chromium-blink-merge.git] / ui / app_list / views / tile_item_view.h
blob27c802440100f34c639be0649e8a7125eb3ddcee
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
3 // found in the LICENSE file.
5 #ifndef UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_
6 #define UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_
8 #include "base/strings/string16.h"
9 #include "ui/app_list/app_list_export.h"
10 #include "ui/views/controls/button/button.h"
11 #include "ui/views/controls/button/custom_button.h"
13 namespace gfx {
14 class ImageSkia;
17 namespace views {
18 class ImageView;
19 class Label;
22 namespace app_list {
24 // The view for a tile in the app list on the start/search page.
25 class APP_LIST_EXPORT TileItemView : public views::CustomButton,
26 public views::ButtonListener {
27 public:
28 TileItemView();
29 ~TileItemView() override;
31 void SetSelected(bool selected);
33 // Overridden from views::CustomButton:
34 void StateChanged() override;
36 protected:
37 void SetIcon(const gfx::ImageSkia& icon);
39 void SetTitle(const base::string16& title);
41 private:
42 void UpdateBackgroundColor();
44 // Overridden from views::View:
45 gfx::Size GetPreferredSize() const override;
47 views::ImageView* icon_; // Owned by views hierarchy.
48 views::Label* title_; // Owned by views hierarchy.
50 bool selected_;
52 DISALLOW_COPY_AND_ASSIGN(TileItemView);
55 } // namespace app_list
57 #endif // UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_