| Index: ash/mus/system_tray_delegate_mus.cc
|
| diff --git a/ash/mus/system_tray_delegate_mus.cc b/ash/mus/system_tray_delegate_mus.cc
|
| index 1c520240cadfc39bd8f70277607e5e07391cfc00..1931e23e7828468e5f987a7147d83c06ff965c08 100644
|
| --- a/ash/mus/system_tray_delegate_mus.cc
|
| +++ b/ash/mus/system_tray_delegate_mus.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "ash/mus/system_tray_delegate_mus.h"
|
|
|
| +#include "ash/common/system/networking_config_delegate.h"
|
| #include "ash/common/system/tray/system_tray_notifier.h"
|
| #include "ash/common/wm_shell.h"
|
| #include "base/bind.h"
|
| @@ -12,15 +13,41 @@
|
| #include "base/logging.h"
|
| #include "services/shell/public/cpp/connector.h"
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +#include "ash/mus/vpn_delegate_mus.h"
|
| +#endif
|
| +
|
| namespace ash {
|
| namespace {
|
|
|
| SystemTrayDelegateMus* g_instance = nullptr;
|
|
|
| +// TODO(mash): Provide a real implementation, perhaps by folding its behavior
|
| +// into an ash-side network information cache. http://crbug.com/651157
|
| +class StubNetworkingConfigDelegate : public NetworkingConfigDelegate {
|
| + public:
|
| + StubNetworkingConfigDelegate() {}
|
| + ~StubNetworkingConfigDelegate() override {}
|
| +
|
| + private:
|
| + // NetworkingConfigDelegate:
|
| + std::unique_ptr<const ExtensionInfo> LookUpExtensionForNetwork(
|
| + const std::string& service_path) override {
|
| + return nullptr;
|
| + }
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(StubNetworkingConfigDelegate);
|
| +};
|
| +
|
| } // namespace
|
|
|
| SystemTrayDelegateMus::SystemTrayDelegateMus(shell::Connector* connector)
|
| - : connector_(connector), hour_clock_type_(base::GetHourClockType()) {
|
| + : connector_(connector),
|
| + hour_clock_type_(base::GetHourClockType()),
|
| + networking_config_delegate_(new StubNetworkingConfigDelegate) {
|
| +#if defined(OS_CHROMEOS)
|
| + vpn_delegate_.reset(new VPNDelegateMus);
|
| +#endif
|
| // Don't make an initial connection to exe:chrome. Do it on demand.
|
| DCHECK(!g_instance);
|
| g_instance = this;
|
| @@ -123,6 +150,19 @@ void SystemTrayDelegateMus::ShowProxySettings() {
|
| ConnectToSystemTrayClient()->ShowProxySettings();
|
| }
|
|
|
| +NetworkingConfigDelegate* SystemTrayDelegateMus::GetNetworkingConfigDelegate()
|
| + const {
|
| + return networking_config_delegate_.get();
|
| +}
|
| +
|
| +VPNDelegate* SystemTrayDelegateMus::GetVPNDelegate() const {
|
| +#if defined(OS_CHROMEOS)
|
| + return vpn_delegate_.get();
|
| +#else
|
| + return nullptr;
|
| +#endif
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // mojom::SystemTray:
|
|
|
|
|