| OLD | NEW |
| 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 #include "ash/mus/system_tray_delegate_mus.h" | 5 #include "ash/mus/system_tray_delegate_mus.h" |
| 6 | 6 |
| 7 #include "ash/session/session_controller.h" | |
| 8 #include "ash/shell.h" | |
| 9 #include "ash/system/networking_config_delegate.h" | 7 #include "ash/system/networking_config_delegate.h" |
| 10 | 8 |
| 11 namespace ash { | 9 namespace ash { |
| 12 namespace { | 10 namespace { |
| 13 | 11 |
| 14 // TODO(mash): Provide a real implementation, perhaps by folding its behavior | 12 // TODO(mash): Provide a real implementation, perhaps by folding its behavior |
| 15 // into an ash-side network information cache. http://crbug.com/651157 | 13 // into an ash-side network information cache. http://crbug.com/651157 |
| 16 class StubNetworkingConfigDelegate : public NetworkingConfigDelegate { | 14 class StubNetworkingConfigDelegate : public NetworkingConfigDelegate { |
| 17 public: | 15 public: |
| 18 StubNetworkingConfigDelegate() {} | 16 StubNetworkingConfigDelegate() {} |
| (...skipping 10 matching lines...) Expand all Loading... |
| 29 }; | 27 }; |
| 30 | 28 |
| 31 } // namespace | 29 } // namespace |
| 32 | 30 |
| 33 SystemTrayDelegateMus::SystemTrayDelegateMus() | 31 SystemTrayDelegateMus::SystemTrayDelegateMus() |
| 34 : networking_config_delegate_(new StubNetworkingConfigDelegate) {} | 32 : networking_config_delegate_(new StubNetworkingConfigDelegate) {} |
| 35 | 33 |
| 36 SystemTrayDelegateMus::~SystemTrayDelegateMus() { | 34 SystemTrayDelegateMus::~SystemTrayDelegateMus() { |
| 37 } | 35 } |
| 38 | 36 |
| 39 LoginStatus SystemTrayDelegateMus::GetUserLoginStatus() const { | |
| 40 return Shell::Get()->session_controller()->login_status(); | |
| 41 } | |
| 42 | |
| 43 NetworkingConfigDelegate* SystemTrayDelegateMus::GetNetworkingConfigDelegate() | 37 NetworkingConfigDelegate* SystemTrayDelegateMus::GetNetworkingConfigDelegate() |
| 44 const { | 38 const { |
| 45 return networking_config_delegate_.get(); | 39 return networking_config_delegate_.get(); |
| 46 } | 40 } |
| 47 | 41 |
| 48 } // namespace ash | 42 } // namespace ash |
| OLD | NEW |