Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: ash/common/system/tray/system_menu_button.h

Issue 2367903002: Introduce SystemMenuButton for Ash material design (Closed)
Patch Set: comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_
6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_
7
8 #include "ash/resources/vector_icons/vector_icons.h"
9 #include "base/macros.h"
10 #include "ui/views/controls/button/button.h"
11 #include "ui/views/controls/button/image_button.h"
12
13 namespace views {
14 class InkDropHighlight;
15 class InkDropRipple;
16 }
17
18 namespace ash {
19
20 // A 48x48 image button with a material design ripple effect, which can be
21 // used across Ash material design native UI menus.
22 // TODO(tdanderson): Deprecate TrayPopupHeaderButton in favor of
23 // SystemMenuButton once material design is enabled by default. See
24 // crbug.com/614453.
25 class SystemMenuButton : public views::ImageButton {
26 public:
27 // Constructs the button with |listener| and a centered icon corresponding to
28 // |icon|. |accessible_name_id| corresponds to the string in
29 // ui::ResourceBundle to use for the button's accessible and tooltip text.
30 SystemMenuButton(views::ButtonListener* listener,
31 const gfx::VectorIcon& icon,
32 int accessible_name_id);
33 ~SystemMenuButton() override;
34
35 // views::ImageButton:
36 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
37 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
38 const override;
39 bool ShouldShowInkDropForFocus() const override;
40
41 private:
42 DISALLOW_COPY_AND_ASSIGN(SystemMenuButton);
43 };
44
45 } // namespace ash
46
47 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/common/system/tray/special_popup_row.cc ('k') | ash/common/system/tray/system_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698