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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 10824142: Support toggling Wi-Fi with keyboard shortcut. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/network/tray_network.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1258 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1258 }; 1259 };
1259 1260
1260 } // namespace 1261 } // namespace
1261 1262
1262 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 1263 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
1263 return new chromeos::SystemTrayDelegate(tray); 1264 return new chromeos::SystemTrayDelegate(tray);
1264 } 1265 }
1265 1266
1266 } // namespace chromeos 1267 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/system/network/tray_network.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698