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

Side by Side Diff: ash/system/tray/system_tray_controller.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/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_controller.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 2016 The Chromium Authors. All rights reserved. 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 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_TRAY_SYSTEM_TRAY_CONTROLLER_H_ 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_ 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/public/interfaces/system_tray.mojom.h" 9 #include "ash/public/interfaces/system_tray.mojom.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 12 matching lines...) Expand all
23 // 23 //
24 // TODO: Consider renaming this to SystemTrayClient or renaming the current 24 // TODO: Consider renaming this to SystemTrayClient or renaming the current
25 // SystemTray to SystemTrayView and making this class SystemTray. 25 // SystemTray to SystemTrayView and making this class SystemTray.
26 class ASH_EXPORT SystemTrayController 26 class ASH_EXPORT SystemTrayController
27 : NON_EXPORTED_BASE(public mojom::SystemTray) { 27 : NON_EXPORTED_BASE(public mojom::SystemTray) {
28 public: 28 public:
29 SystemTrayController(); 29 SystemTrayController();
30 ~SystemTrayController() override; 30 ~SystemTrayController() override;
31 31
32 base::HourClockType hour_clock_type() const { return hour_clock_type_; } 32 base::HourClockType hour_clock_type() const { return hour_clock_type_; }
33 const std::string& enterprise_domain() const { return enterprise_domain_; }
34 bool active_directory_managed() const { return active_directory_managed_; }
33 35
34 // Wrappers around the mojom::SystemTrayClient interface. 36 // Wrappers around the mojom::SystemTrayClient interface.
35 void ShowSettings(); 37 void ShowSettings();
36 void ShowBluetoothSettings(); 38 void ShowBluetoothSettings();
37 void ShowBluetoothPairingDialog(const std::string& address, 39 void ShowBluetoothPairingDialog(const std::string& address,
38 const base::string16& name_for_display, 40 const base::string16& name_for_display,
39 bool paired, 41 bool paired,
40 bool connected); 42 bool connected);
41 void ShowDateSettings(); 43 void ShowDateSettings();
42 void ShowSetTimeDialog(); 44 void ShowSetTimeDialog();
43 void ShowDisplaySettings(); 45 void ShowDisplaySettings();
44 void ShowPowerSettings(); 46 void ShowPowerSettings();
45 void ShowChromeSlow(); 47 void ShowChromeSlow();
46 void ShowIMESettings(); 48 void ShowIMESettings();
47 void ShowHelp(); 49 void ShowHelp();
48 void ShowAccessibilityHelp(); 50 void ShowAccessibilityHelp();
49 void ShowAccessibilitySettings(); 51 void ShowAccessibilitySettings();
50 void ShowPaletteHelp(); 52 void ShowPaletteHelp();
51 void ShowPaletteSettings(); 53 void ShowPaletteSettings();
52 void ShowPublicAccountInfo(); 54 void ShowPublicAccountInfo();
55 void ShowEnterpriseInfo();
53 void ShowNetworkConfigure(const std::string& network_id); 56 void ShowNetworkConfigure(const std::string& network_id);
54 void ShowNetworkCreate(const std::string& type); 57 void ShowNetworkCreate(const std::string& type);
55 void ShowThirdPartyVpnCreate(const std::string& extension_id); 58 void ShowThirdPartyVpnCreate(const std::string& extension_id);
56 void ShowNetworkSettings(const std::string& network_id); 59 void ShowNetworkSettings(const std::string& network_id);
57 void ShowProxySettings(); 60 void ShowProxySettings();
58 void SignOut(); 61 void SignOut();
59 void RequestRestartForUpdate(); 62 void RequestRestartForUpdate();
60 63
61 // Binds the mojom::SystemTray interface to this object. 64 // Binds the mojom::SystemTray interface to this object.
62 void BindRequest(mojom::SystemTrayRequest request); 65 void BindRequest(mojom::SystemTrayRequest request);
63 66
64 // mojom::SystemTray overrides. Public for testing. 67 // mojom::SystemTray overrides. Public for testing.
65 void SetClient(mojom::SystemTrayClientPtr client) override; 68 void SetClient(mojom::SystemTrayClientPtr client) override;
66 void SetPrimaryTrayEnabled(bool enabled) override; 69 void SetPrimaryTrayEnabled(bool enabled) override;
67 void SetPrimaryTrayVisible(bool visible) override; 70 void SetPrimaryTrayVisible(bool visible) override;
68 void SetUse24HourClock(bool use_24_hour) override; 71 void SetUse24HourClock(bool use_24_hour) override;
72 void SetEnterpriseDomain(const std::string& enterprise_domain,
73 bool active_directory_managed) override;
69 void ShowUpdateIcon(mojom::UpdateSeverity severity, 74 void ShowUpdateIcon(mojom::UpdateSeverity severity,
70 bool factory_reset_required, 75 bool factory_reset_required,
71 mojom::UpdateType update_type) override; 76 mojom::UpdateType update_type) override;
72 77
73 private: 78 private:
74 // Client interface in chrome browser. May be null in tests. 79 // Client interface in chrome browser. May be null in tests.
75 mojom::SystemTrayClientPtr system_tray_client_; 80 mojom::SystemTrayClientPtr system_tray_client_;
76 81
77 // Bindings for the SystemTray interface. 82 // Bindings for the SystemTray interface.
78 mojo::BindingSet<mojom::SystemTray> bindings_; 83 mojo::BindingSet<mojom::SystemTray> bindings_;
79 84
80 // The type of clock hour display: 12 or 24 hour. 85 // The type of clock hour display: 12 or 24 hour.
81 base::HourClockType hour_clock_type_; 86 base::HourClockType hour_clock_type_;
82 87
88 // The domain name of the organization that manages the device. Empty if the
89 // device is not enterprise enrolled or if it uses Active Directory.
90 std::string enterprise_domain_;
91
92 // Whether this is an Active Directory managed enterprise device.
93 bool active_directory_managed_ = false;
94
83 DISALLOW_COPY_AND_ASSIGN(SystemTrayController); 95 DISALLOW_COPY_AND_ASSIGN(SystemTrayController);
84 }; 96 };
85 97
86 } // namspace ash 98 } // namspace ash
87 99
88 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_ 100 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698