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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), | 682 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), |
683 chrome::kBluetoothAddDeviceSubPage); | 683 chrome::kBluetoothAddDeviceSubPage); |
684 } | 684 } |
685 | 685 |
686 virtual void ToggleAirplaneMode() OVERRIDE { | 686 virtual void ToggleAirplaneMode() OVERRIDE { |
687 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); | 687 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); |
688 crosnet->EnableOfflineMode(!crosnet->offline_mode()); | 688 crosnet->EnableOfflineMode(!crosnet->offline_mode()); |
689 } | 689 } |
690 | 690 |
691 virtual void ToggleWifi() OVERRIDE { | 691 virtual void ToggleWifi() OVERRIDE { |
| 692 tray_->network_observer()->OnWillToggleWifi(); |
692 network_menu_->ToggleWifi(); | 693 network_menu_->ToggleWifi(); |
693 } | 694 } |
694 | 695 |
695 virtual void ToggleMobile() OVERRIDE { | 696 virtual void ToggleMobile() OVERRIDE { |
696 network_menu_->ToggleMobile(); | 697 network_menu_->ToggleMobile(); |
697 } | 698 } |
698 | 699 |
699 virtual void ToggleBluetooth() OVERRIDE { | 700 virtual void ToggleBluetooth() OVERRIDE { |
700 bluetooth_adapter_->SetPowered(!bluetooth_adapter_->IsPowered(), | 701 bluetooth_adapter_->SetPowered(!bluetooth_adapter_->IsPowered(), |
701 base::Bind(&base::DoNothing), | 702 base::Bind(&base::DoNothing), |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1259 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1259 }; | 1260 }; |
1260 | 1261 |
1261 } // namespace | 1262 } // namespace |
1262 | 1263 |
1263 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 1264 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
1264 return new chromeos::SystemTrayDelegate(tray); | 1265 return new chromeos::SystemTrayDelegate(tray); |
1265 } | 1266 } |
1266 | 1267 |
1267 } // namespace chromeos | 1268 } // namespace chromeos |
OLD | NEW |