| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 #include "chrome/common/url_constants.h" | 89 #include "chrome/common/url_constants.h" |
| 90 #include "chromeos/chromeos_switches.h" | 90 #include "chromeos/chromeos_switches.h" |
| 91 #include "chromeos/dbus/dbus_thread_manager.h" | 91 #include "chromeos/dbus/dbus_thread_manager.h" |
| 92 #include "chromeos/dbus/power_manager_client.h" | 92 #include "chromeos/dbus/power_manager_client.h" |
| 93 #include "chromeos/dbus/session_manager_client.h" | 93 #include "chromeos/dbus/session_manager_client.h" |
| 94 #include "chromeos/dbus/system_clock_client.h" | 94 #include "chromeos/dbus/system_clock_client.h" |
| 95 #include "chromeos/ime/extension_ime_util.h" | 95 #include "chromeos/ime/extension_ime_util.h" |
| 96 #include "chromeos/ime/input_method_manager.h" | 96 #include "chromeos/ime/input_method_manager.h" |
| 97 #include "chromeos/ime/xkeyboard.h" | 97 #include "chromeos/ime/xkeyboard.h" |
| 98 #include "chromeos/login/login_state.h" | 98 #include "chromeos/login/login_state.h" |
| 99 #include "chromeos/network/network_activation_handler.h" |
| 99 #include "chromeos/network/network_event_log.h" | 100 #include "chromeos/network/network_event_log.h" |
| 100 #include "chromeos/network/network_state.h" | 101 #include "chromeos/network/network_state.h" |
| 101 #include "chromeos/network/network_state_handler.h" | 102 #include "chromeos/network/network_state_handler.h" |
| 102 #include "chromeos/network/shill_property_util.h" | 103 #include "chromeos/network/shill_property_util.h" |
| 103 #include "content/public/browser/browser_thread.h" | 104 #include "content/public/browser/browser_thread.h" |
| 104 #include "content/public/browser/notification_observer.h" | 105 #include "content/public/browser/notification_observer.h" |
| 105 #include "content/public/browser/notification_service.h" | 106 #include "content/public/browser/notification_service.h" |
| 106 #include "content/public/browser/user_metrics.h" | 107 #include "content/public/browser/user_metrics.h" |
| 107 #include "content/public/browser/web_contents.h" | 108 #include "content/public/browser/web_contents.h" |
| 108 #include "device/bluetooth/bluetooth_adapter.h" | 109 #include "device/bluetooth/bluetooth_adapter.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 return; | 262 return; |
| 262 } | 263 } |
| 263 | 264 |
| 264 if (network->type() == flimflam::kTypeWimax || | 265 if (network->type() == flimflam::kTypeWimax || |
| 265 network->type() == flimflam::kTypeVPN) { | 266 network->type() == flimflam::kTypeVPN) { |
| 266 NetworkConfigView::Show(service_path, parent_window); | 267 NetworkConfigView::Show(service_path, parent_window); |
| 267 return; | 268 return; |
| 268 } | 269 } |
| 269 | 270 |
| 270 if (network->type() == flimflam::kTypeCellular) { | 271 if (network->type() == flimflam::kTypeCellular) { |
| 271 if (network->activation_state() != flimflam::kActivationStateActivated) { | 272 if (NetworkActivationHandler::NetworkRequiresActivation(network)) { |
| 272 ash::network_connect::ActivateCellular(service_path); | 273 ash::network_connect::ActivateCellular(service_path); |
| 273 return; | 274 return; |
| 274 } | 275 } |
| 275 if (network->cellular_out_of_credits()) { | 276 if (network->cellular_out_of_credits()) { |
| 276 ash::network_connect::ShowMobileSetup(service_path); | 277 ash::network_connect::ShowMobileSetup(service_path); |
| 277 return; | 278 return; |
| 278 } | 279 } |
| 279 // No special configure or setup for |network|, show the settings UI. | 280 // No special configure or setup for |network|, show the settings UI. |
| 280 if (LoginState::Get()->IsUserLoggedIn()) | 281 if (LoginState::Get()->IsUserLoggedIn()) |
| 281 ShowNetworkSettingsPage(service_path); | 282 ShowNetworkSettingsPage(service_path); |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1338 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1338 }; | 1339 }; |
| 1339 | 1340 |
| 1340 } // namespace | 1341 } // namespace |
| 1341 | 1342 |
| 1342 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1343 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1343 return new chromeos::SystemTrayDelegate(); | 1344 return new chromeos::SystemTrayDelegate(); |
| 1344 } | 1345 } |
| 1345 | 1346 |
| 1346 } // namespace chromeos | 1347 } // namespace chromeos |
| OLD | NEW |