Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / ash / system / date / date_default_view.h
blob2efcdf84f358be281dd459072f85c317a2a01f98
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 ASH_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_
6 #define ASH_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_
8 #include "ash/ash_export.h"
9 #include "ash/system/chromeos/shutdown_policy_observer.h"
10 #include "ash/system/user/login_status.h"
11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h"
13 #include "ui/views/controls/button/button.h"
14 #include "ui/views/view.h"
16 namespace ash {
17 namespace tray {
18 class DateView;
19 } // namespace tray
21 class TrayPopupHeaderButton;
23 class ASH_EXPORT DateDefaultView : public views::View,
24 public views::ButtonListener,
25 public ash::ShutdownPolicyObserver {
26 public:
27 explicit DateDefaultView(ash::user::LoginStatus login);
29 ~DateDefaultView() override;
31 views::View* GetHelpButtonView();
32 const views::View* GetShutdownButtonViewForTest() const;
34 tray::DateView* GetDateView();
35 const tray::DateView* GetDateView() const;
37 // ash::ShutdownPolicyObserver:
38 void OnShutdownPolicyChanged(bool reboot_on_shutdown) override;
40 private:
41 // Overridden from views::ButtonListener.
42 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
44 TrayPopupHeaderButton* help_button_;
45 TrayPopupHeaderButton* shutdown_button_;
46 TrayPopupHeaderButton* lock_button_;
47 tray::DateView* date_view_;
49 base::WeakPtrFactory<DateDefaultView> weak_factory_;
51 DISALLOW_COPY_AND_ASSIGN(DateDefaultView);
54 } // namespace ash
56 #endif // ASH_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_