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

Side by Side Diff: ash/common/system/date/date_default_view.h

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: fix cros build Created 3 years, 9 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 ASH_COMMON_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_ 5 #ifndef ASH_COMMON_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_
6 #define ASH_COMMON_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_ 6 #define ASH_COMMON_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/login_status.h" 9 #include "ash/common/login_status.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/views/controls/button/button.h" 11 #include "ui/views/controls/button/image_button.h"
12 #include "ui/views/view.h" 12 #include "ui/views/view.h"
13 13
14 namespace ash { 14 namespace ash {
15 namespace tray { 15 namespace tray {
16 class DateView; 16 class DateView;
17 } // namespace tray 17 } // namespace tray
18 18
19 class SystemTrayItem; 19 class SystemTrayItem;
20 class TrayPopupHeaderButton; 20 class TrayPopupHeaderButton;
21 21
22 // The system tray bubble view with the date and buttons for help, lock and 22 // The system tray bubble view with the date and buttons for help, lock and
23 // shutdown. 23 // shutdown.
24 // TODO(tdanderson): Remove this class once material design is enabled by 24 // TODO(tdanderson): Remove this class once material design is enabled by
25 // default. See crbug.com/614453. 25 // default. See crbug.com/614453.
26 class ASH_EXPORT DateDefaultView : public views::View, 26 class ASH_EXPORT DateDefaultView : public views::View,
27 public views::ButtonListener { 27 public views::ImageButtonDelegate {
28 public: 28 public:
29 DateDefaultView(SystemTrayItem* owner, LoginStatus login); 29 DateDefaultView(SystemTrayItem* owner, LoginStatus login);
30 30
31 ~DateDefaultView() override; 31 ~DateDefaultView() override;
32 32
33 views::View* GetHelpButtonView(); 33 views::View* GetHelpButtonView();
34 const views::View* GetShutdownButtonViewForTest() const; 34 const views::View* GetShutdownButtonViewForTest() const;
35 35
36 tray::DateView* GetDateView(); 36 tray::DateView* GetDateView();
37 const tray::DateView* GetDateView() const; 37 const tray::DateView* GetDateView() const;
38 38
39 private: 39 private:
40 // Overridden from views::ButtonListener. 40 // views::ImageButtonDelegate:
41 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 41 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
42 42
43 TrayPopupHeaderButton* help_button_; 43 TrayPopupHeaderButton* help_button_;
44 TrayPopupHeaderButton* shutdown_button_; 44 TrayPopupHeaderButton* shutdown_button_;
45 TrayPopupHeaderButton* lock_button_; 45 TrayPopupHeaderButton* lock_button_;
46 tray::DateView* date_view_; 46 tray::DateView* date_view_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(DateDefaultView); 48 DISALLOW_COPY_AND_ASSIGN(DateDefaultView);
49 }; 49 };
50 50
51 } // namespace ash 51 } // namespace ash
52 52
53 #endif // ASH_COMMON_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_ 53 #endif // ASH_COMMON_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698