| 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 "ash/system/status_area_widget.h" | 5 #include "ash/system/status_area_widget.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| 11 #include "ash/system/bluetooth/bluetooth_observer.h" | 11 #include "ash/system/bluetooth/bluetooth_observer.h" |
| 12 #include "ash/system/network/network_observer.h" | |
| 13 #include "ash/system/status_area_widget_delegate.h" | 12 #include "ash/system/status_area_widget_delegate.h" |
| 14 #include "ash/system/tray/system_tray.h" | 13 #include "ash/system/tray/system_tray.h" |
| 15 #include "ash/system/tray/system_tray_delegate.h" | 14 #include "ash/system/tray/system_tray_delegate.h" |
| 16 #include "ash/system/web_notification/web_notification_tray.h" | 15 #include "ash/system/web_notification/web_notification_tray.h" |
| 17 #include "ash/volume_control_delegate.h" | 16 #include "ash/volume_control_delegate.h" |
| 18 #include "ash/wm/shelf_layout_manager.h" | 17 #include "ash/wm/shelf_layout_manager.h" |
| 19 #include "ash/wm/window_properties.h" | 18 #include "ash/wm/window_properties.h" |
| 20 #include "base/i18n/time_formatting.h" | 19 #include "base/i18n/time_formatting.h" |
| 21 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 22 #include "ui/aura/window.h" | 21 #include "ui/aura/window.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 193 } |
| 195 | 194 |
| 196 virtual void AddBluetoothDevice() OVERRIDE { | 195 virtual void AddBluetoothDevice() OVERRIDE { |
| 197 } | 196 } |
| 198 | 197 |
| 199 virtual void ToggleAirplaneMode() OVERRIDE { | 198 virtual void ToggleAirplaneMode() OVERRIDE { |
| 200 } | 199 } |
| 201 | 200 |
| 202 virtual void ToggleWifi() OVERRIDE { | 201 virtual void ToggleWifi() OVERRIDE { |
| 203 wifi_enabled_ = !wifi_enabled_; | 202 wifi_enabled_ = !wifi_enabled_; |
| 204 ash::NetworkObserver* observer = | |
| 205 ash::Shell::GetInstance()->system_tray()->network_observer(); | |
| 206 if (observer) { | |
| 207 ash::NetworkIconInfo info; | |
| 208 observer->OnNetworkRefresh(info); | |
| 209 } | |
| 210 } | 203 } |
| 211 | 204 |
| 212 virtual void ToggleMobile() OVERRIDE { | 205 virtual void ToggleMobile() OVERRIDE { |
| 213 cellular_enabled_ = !cellular_enabled_; | 206 cellular_enabled_ = !cellular_enabled_; |
| 214 ash::NetworkObserver* observer = | |
| 215 ash::Shell::GetInstance()->system_tray()->network_observer(); | |
| 216 if (observer) { | |
| 217 ash::NetworkIconInfo info; | |
| 218 observer->OnNetworkRefresh(info); | |
| 219 } | |
| 220 } | 207 } |
| 221 | 208 |
| 222 virtual void ToggleBluetooth() OVERRIDE { | 209 virtual void ToggleBluetooth() OVERRIDE { |
| 223 bluetooth_enabled_ = !bluetooth_enabled_; | 210 bluetooth_enabled_ = !bluetooth_enabled_; |
| 224 ash::BluetoothObserver* observer = | |
| 225 ash::Shell::GetInstance()->system_tray()->bluetooth_observer(); | |
| 226 if (observer) | |
| 227 observer->OnBluetoothRefresh(); | |
| 228 } | 211 } |
| 229 | 212 |
| 230 virtual void ShowOtherWifi() OVERRIDE { | 213 virtual void ShowOtherWifi() OVERRIDE { |
| 231 } | 214 } |
| 232 | 215 |
| 233 virtual void ShowOtherCellular() OVERRIDE { | 216 virtual void ShowOtherCellular() OVERRIDE { |
| 234 } | 217 } |
| 235 | 218 |
| 236 virtual bool IsNetworkConnected() OVERRIDE { | 219 virtual bool IsNetworkConnected() OVERRIDE { |
| 237 return true; | 220 return true; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 return; | 405 return; |
| 423 login_status_ = login_status; | 406 login_status_ = login_status; |
| 424 if (system_tray_) | 407 if (system_tray_) |
| 425 system_tray_->UpdateAfterLoginStatusChange(login_status); | 408 system_tray_->UpdateAfterLoginStatusChange(login_status); |
| 426 if (web_notification_tray_) | 409 if (web_notification_tray_) |
| 427 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 410 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
| 428 } | 411 } |
| 429 | 412 |
| 430 } // namespace internal | 413 } // namespace internal |
| 431 } // namespace ash | 414 } // namespace ash |
| OLD | NEW |