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

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

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble by default 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
« no previous file with comments | « ash/common/system/chromeos/tray_tracing.cc ('k') | ash/common/system/date/date_default_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/common/system/chromeos/shutdown_policy_observer.h" 10 #include "ash/common/system/chromeos/shutdown_policy_observer.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "ui/views/controls/button/button.h" 13 #include "ui/views/controls/button/button.h"
14 #include "ui/views/view.h" 14 #include "ui/views/view.h"
15 15
16 namespace ash { 16 namespace ash {
17 namespace tray { 17 namespace tray {
18 class DateView; 18 class DateView;
19 } // namespace tray 19 } // namespace tray
20 20
21 class SystemTrayItem;
21 class TrayPopupHeaderButton; 22 class TrayPopupHeaderButton;
22 23
23 // The system tray bubble view with the date and buttons for help, lock and 24 // The system tray bubble view with the date and buttons for help, lock and
24 // shutdown. 25 // shutdown.
25 class ASH_EXPORT DateDefaultView : public views::View, 26 class ASH_EXPORT DateDefaultView : public views::View,
26 public views::ButtonListener, 27 public views::ButtonListener,
27 public ShutdownPolicyObserver { 28 public ShutdownPolicyObserver {
28 public: 29 public:
29 explicit DateDefaultView(LoginStatus login); 30 DateDefaultView(SystemTrayItem* owner, LoginStatus login);
30 31
31 ~DateDefaultView() override; 32 ~DateDefaultView() override;
32 33
33 views::View* GetHelpButtonView(); 34 views::View* GetHelpButtonView();
34 const views::View* GetShutdownButtonViewForTest() const; 35 const views::View* GetShutdownButtonViewForTest() const;
35 36
36 tray::DateView* GetDateView(); 37 tray::DateView* GetDateView();
37 const tray::DateView* GetDateView() const; 38 const tray::DateView* GetDateView() const;
38 39
39 // ash::ShutdownPolicyObserver: 40 // ash::ShutdownPolicyObserver:
40 void OnShutdownPolicyChanged(bool reboot_on_shutdown) override; 41 void OnShutdownPolicyChanged(bool reboot_on_shutdown) override;
41 42
42 private: 43 private:
43 // Overridden from views::ButtonListener. 44 // Overridden from views::ButtonListener.
44 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 45 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
45 46
46 TrayPopupHeaderButton* help_button_; 47 TrayPopupHeaderButton* help_button_;
47 TrayPopupHeaderButton* shutdown_button_; 48 TrayPopupHeaderButton* shutdown_button_;
48 TrayPopupHeaderButton* lock_button_; 49 TrayPopupHeaderButton* lock_button_;
49 tray::DateView* date_view_; 50 tray::DateView* date_view_;
50 51
51 base::WeakPtrFactory<DateDefaultView> weak_factory_; 52 base::WeakPtrFactory<DateDefaultView> weak_factory_;
52 53
53 DISALLOW_COPY_AND_ASSIGN(DateDefaultView); 54 DISALLOW_COPY_AND_ASSIGN(DateDefaultView);
54 }; 55 };
55 56
56 } // namespace ash 57 } // namespace ash
57 58
58 #endif // ASH_COMMON_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_ 59 #endif // ASH_COMMON_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/tray_tracing.cc ('k') | ash/common/system/date/date_default_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698