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

Side by Side Diff: ash/mus/system_tray_delegate_mus.h

Issue 2378193002: mustash: Show networking items in ash system tray (Closed)
Patch Set: back to ifdefs Created 4 years, 2 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 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_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_ 5 #ifndef ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_
6 #define ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_ 6 #define ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_
7 7
8 #include <memory>
9
8 #include "ash/common/system/tray/default_system_tray_delegate.h" 10 #include "ash/common/system/tray/default_system_tray_delegate.h"
9 #include "ash/public/interfaces/system_tray.mojom.h" 11 #include "ash/public/interfaces/system_tray.mojom.h"
10 #include "base/i18n/time_formatting.h" 12 #include "base/i18n/time_formatting.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 14
13 namespace shell { 15 namespace shell {
14 class Connector; 16 class Connector;
15 } 17 }
16 18
17 namespace ash { 19 namespace ash {
18 20
21 class NetworkingConfigDelegate;
22 class VPNDelegate;
msw 2016/09/28 22:19:54 optional nit: if the fwd decl suffices, make vpn_d
James Cook 2016/09/29 16:45:39 Actually, I went the other way and made this whole
23
19 // Handles the settings displayed in the system tray menu. For mus most settings 24 // Handles the settings displayed in the system tray menu. For mus most settings
20 // are obtained from chrome browser via mojo IPC. For the classic ash version 25 // are obtained from chrome browser via mojo IPC. For the classic ash version
21 // see SystemTrayDelegateChromeOS. 26 // see SystemTrayDelegateChromeOS.
22 // 27 //
23 // TODO: Support all methods in SystemTrayDelegate. http://crbug.com/647412. 28 // TODO: Support all methods in SystemTrayDelegate. http://crbug.com/647412.
24 class SystemTrayDelegateMus : public DefaultSystemTrayDelegate, 29 class SystemTrayDelegateMus : public DefaultSystemTrayDelegate,
25 public mojom::SystemTray { 30 public mojom::SystemTray {
26 public: 31 public:
27 explicit SystemTrayDelegateMus(shell::Connector* connector); 32 explicit SystemTrayDelegateMus(shell::Connector* connector);
28 ~SystemTrayDelegateMus() override; 33 ~SystemTrayDelegateMus() override;
(...skipping 18 matching lines...) Expand all
47 void ShowChromeSlow() override; 52 void ShowChromeSlow() override;
48 void ShowIMESettings() override; 53 void ShowIMESettings() override;
49 void ShowHelp() override; 54 void ShowHelp() override;
50 void ShowAccessibilityHelp() override; 55 void ShowAccessibilityHelp() override;
51 void ShowAccessibilitySettings() override; 56 void ShowAccessibilitySettings() override;
52 void ShowPaletteHelp() override; 57 void ShowPaletteHelp() override;
53 void ShowPaletteSettings() override; 58 void ShowPaletteSettings() override;
54 void ShowPublicAccountInfo() override; 59 void ShowPublicAccountInfo() override;
55 void ShowEnterpriseInfo() override; 60 void ShowEnterpriseInfo() override;
56 void ShowProxySettings() override; 61 void ShowProxySettings() override;
62 NetworkingConfigDelegate* GetNetworkingConfigDelegate() const override;
63 VPNDelegate* GetVPNDelegate() const override;
57 64
58 // mojom::SystemTray: 65 // mojom::SystemTray:
59 void SetUse24HourClock(bool use_24_hour) override; 66 void SetUse24HourClock(bool use_24_hour) override;
60 67
61 // May be null in unit tests. 68 // May be null in unit tests.
62 shell::Connector* connector_; 69 shell::Connector* connector_;
63 70
64 // Client interface in chrome browser. 71 // Client interface in chrome browser.
65 mojom::SystemTrayClientPtr system_tray_client_; 72 mojom::SystemTrayClientPtr system_tray_client_;
66 73
67 // 12 or 24 hour display. 74 // 12 or 24 hour display.
68 base::HourClockType hour_clock_type_; 75 base::HourClockType hour_clock_type_;
69 76
77 std::unique_ptr<NetworkingConfigDelegate> networking_config_delegate_;
78
79 #if defined(OS_CHROMEOS)
80 std::unique_ptr<VPNDelegate> vpn_delegate_;
81 #endif
82
70 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateMus); 83 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateMus);
71 }; 84 };
72 85
73 } // namespace ash 86 } // namespace ash
74 87
75 #endif // ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_ 88 #endif // ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698