| OLD | NEW |
| 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 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/system/audio/audio_observer.h" | 9 #include "ash/system/audio/audio_observer.h" |
| 10 #include "ash/system/bluetooth/bluetooth_observer.h" | 10 #include "ash/system/bluetooth/bluetooth_observer.h" |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 std::string* wifi_mac_address) OVERRIDE { | 581 std::string* wifi_mac_address) OVERRIDE { |
| 582 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); | 582 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); |
| 583 if (crosnet->Connected()) | 583 if (crosnet->Connected()) |
| 584 *ip_address = crosnet->IPAddress(); | 584 *ip_address = crosnet->IPAddress(); |
| 585 else | 585 else |
| 586 *ip_address = std::string(); | 586 *ip_address = std::string(); |
| 587 | 587 |
| 588 *ethernet_mac_address = std::string(); | 588 *ethernet_mac_address = std::string(); |
| 589 const NetworkDevice* ether = crosnet->FindEthernetDevice(); | 589 const NetworkDevice* ether = crosnet->FindEthernetDevice(); |
| 590 if (ether) | 590 if (ether) |
| 591 crosnet->GetIPConfigs(ether->device_path(), ethernet_mac_address, | 591 crosnet->GetIPConfigsAndBlock(ether->device_path(), ethernet_mac_address, |
| 592 NetworkLibrary::FORMAT_COLON_SEPARATED_HEX); | 592 NetworkLibrary::FORMAT_COLON_SEPARATED_HEX); |
| 593 | 593 |
| 594 *wifi_mac_address = std::string(); | 594 *wifi_mac_address = std::string(); |
| 595 const NetworkDevice* wifi = crosnet->wifi_enabled() ? | 595 const NetworkDevice* wifi = crosnet->wifi_enabled() ? |
| 596 crosnet->FindWifiDevice() : NULL; | 596 crosnet->FindWifiDevice() : NULL; |
| 597 if (wifi) | 597 if (wifi) |
| 598 crosnet->GetIPConfigs(wifi->device_path(), wifi_mac_address, | 598 crosnet->GetIPConfigsAndBlock(wifi->device_path(), wifi_mac_address, |
| 599 NetworkLibrary::FORMAT_COLON_SEPARATED_HEX); | 599 NetworkLibrary::FORMAT_COLON_SEPARATED_HEX); |
| 600 } | 600 } |
| 601 | 601 |
| 602 virtual void ConnectToNetwork(const std::string& network_id) OVERRIDE { | 602 virtual void ConnectToNetwork(const std::string& network_id) OVERRIDE { |
| 603 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); | 603 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); |
| 604 Network* network = crosnet->FindNetworkByPath(network_id); | 604 Network* network = crosnet->FindNetworkByPath(network_id); |
| 605 if (network) | 605 if (network) |
| 606 network_menu_->ConnectToNetwork(network); | 606 network_menu_->ConnectToNetwork(network); |
| 607 } | 607 } |
| 608 | 608 |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1327 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1328 }; | 1328 }; |
| 1329 | 1329 |
| 1330 } // namespace | 1330 } // namespace |
| 1331 | 1331 |
| 1332 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1332 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1333 return new chromeos::SystemTrayDelegate(); | 1333 return new chromeos::SystemTrayDelegate(); |
| 1334 } | 1334 } |
| 1335 | 1335 |
| 1336 } // namespace chromeos | 1336 } // namespace chromeos |
| OLD | NEW |