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

Side by Side Diff: ash/system/enterprise/tray_enterprise.h

Issue 2839043004: chromeos: Refactor ash SystemTrayDelegate enterprise methods to mojo (Closed)
Patch Set: review comments Created 3 years, 8 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/public/interfaces/system_tray.mojom ('k') | ash/system/enterprise/tray_enterprise.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SYSTEM_ENTERPRISE_TRAY_ENTERPRISE_H_ 5 #ifndef ASH_SYSTEM_ENTERPRISE_TRAY_ENTERPRISE_H_
6 #define ASH_SYSTEM_ENTERPRISE_TRAY_ENTERPRISE_H_ 6 #define ASH_SYSTEM_ENTERPRISE_TRAY_ENTERPRISE_H_
7 7
8 #include "ash/system/enterprise/enterprise_domain_observer.h" 8 #include "ash/system/enterprise/enterprise_domain_observer.h"
9 #include "ash/system/tray/system_tray_item.h" 9 #include "ash/system/tray/system_tray_item.h"
10 #include "ash/system/tray/view_click_listener.h" 10 #include "ash/system/tray/view_click_listener.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 12
13 namespace ash { 13 namespace ash {
14 class LabelTrayView; 14 class LabelTrayView;
15 class SystemTray; 15 class SystemTray;
16 16
17 // System tray item that shows a message ("This device managed by example.com")
18 // in the tray menu for enterprise enrolled devices.
17 class TrayEnterprise : public SystemTrayItem, 19 class TrayEnterprise : public SystemTrayItem,
18 public ViewClickListener, 20 public ViewClickListener,
19 public EnterpriseDomainObserver { 21 public EnterpriseDomainObserver {
20 public: 22 public:
21 explicit TrayEnterprise(SystemTray* system_tray); 23 explicit TrayEnterprise(SystemTray* system_tray);
22 ~TrayEnterprise() override; 24 ~TrayEnterprise() override;
23 25
24 // If message is not empty updates content of default view, otherwise hides 26 // If message is not empty updates content of default view, otherwise hides
25 // tray items. 27 // tray items.
26 void UpdateEnterpriseMessage(); 28 void UpdateEnterpriseMessage();
27 29
28 // Overridden from SystemTrayItem. 30 // Overridden from SystemTrayItem.
29 views::View* CreateDefaultView(LoginStatus status) override; 31 views::View* CreateDefaultView(LoginStatus status) override;
30 void DestroyDefaultView() override; 32 void DestroyDefaultView() override;
31 33
32 // Overridden from EnterpriseDomainObserver. 34 // Overridden from EnterpriseDomainObserver.
33 void OnEnterpriseDomainChanged() override; 35 void OnEnterpriseDomainChanged() override;
34 36
35 // Overridden from ViewClickListener. 37 // Overridden from ViewClickListener.
36 void OnViewClicked(views::View* sender) override; 38 void OnViewClicked(views::View* sender) override;
37 39
40 LabelTrayView* tray_view() { return tray_view_; }
41
38 private: 42 private:
39 LabelTrayView* tray_view_; 43 LabelTrayView* tray_view_;
40 44
41 DISALLOW_COPY_AND_ASSIGN(TrayEnterprise); 45 DISALLOW_COPY_AND_ASSIGN(TrayEnterprise);
42 }; 46 };
43 47
44 } // namespace ash 48 } // namespace ash
45 49
46 #endif // ASH_SYSTEM_ENTERPRISE_TRAY_ENTERPRISE_H_ 50 #endif // ASH_SYSTEM_ENTERPRISE_TRAY_ENTERPRISE_H_
OLDNEW
« no previous file with comments | « ash/public/interfaces/system_tray.mojom ('k') | ash/system/enterprise/tray_enterprise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698