| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include "ash/keyboard_overlay/keyboard_overlay_view.h" | 7 #include "ash/keyboard_overlay/keyboard_overlay_view.h" |
| 8 #include "ash/system/chromeos/network/network_observer.h" | 8 #include "ash/system/chromeos/network/network_observer.h" |
| 9 #include "ash/system/tray/system_tray_notifier.h" | 9 #include "ash/system/tray/system_tray_notifier.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 content::Referrer(), | 88 content::Referrer(), |
| 89 NEW_FOREGROUND_TAB, | 89 NEW_FOREGROUND_TAB, |
| 90 content::PAGE_TRANSITION_GENERATED, | 90 content::PAGE_TRANSITION_GENERATED, |
| 91 false)); | 91 false)); |
| 92 browser->window()->Show(); | 92 browser->window()->Show(); |
| 93 browser->window()->Activate(); | 93 browser->window()->Activate(); |
| 94 page->GetView()->Focus(); | 94 page->GetView()->Focus(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void ChromeShellDelegate::OpenMobileSetup(const std::string& service_path) { | 97 void ChromeShellDelegate::OpenMobileSetup(const std::string& service_path) { |
| 98 // TODO(stevenjb): Replace with non-NetworkLibrary UI. |
| 98 chromeos::NetworkLibrary* cros = | 99 chromeos::NetworkLibrary* cros = |
| 99 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); | 100 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); |
| 100 const chromeos::CellularNetwork* cellular = | 101 const chromeos::CellularNetwork* cellular = |
| 101 cros->FindCellularNetworkByPath(service_path); | 102 cros->FindCellularNetworkByPath(service_path); |
| 102 if (cellular && !cellular->activated() && | 103 if (cellular && !cellular->activated() && |
| 103 cellular->activate_over_non_cellular_network() && | 104 cellular->activate_over_non_cellular_network() && |
| 104 (!cros->connected_network() || !cros->connected_network()->online())) { | 105 (!cros->connected_network() || !cros->connected_network()->online())) { |
| 105 chromeos::NetworkTechnology technology = cellular->network_technology(); | 106 chromeos::NetworkTechnology technology = cellular->network_technology(); |
| 106 ash::NetworkObserver::NetworkType network_type = | 107 ash::NetworkObserver::NetworkType network_type = |
| 107 (technology == chromeos::NETWORK_TECHNOLOGY_LTE || | 108 (technology == chromeos::NETWORK_TECHNOLOGY_LTE || |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 258 } |
| 258 | 259 |
| 259 void ChromeShellDelegate::PlatformInit() { | 260 void ChromeShellDelegate::PlatformInit() { |
| 260 registrar_.Add(this, | 261 registrar_.Add(this, |
| 261 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 262 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 262 content::NotificationService::AllSources()); | 263 content::NotificationService::AllSources()); |
| 263 registrar_.Add(this, | 264 registrar_.Add(this, |
| 264 chrome::NOTIFICATION_SESSION_STARTED, | 265 chrome::NOTIFICATION_SESSION_STARTED, |
| 265 content::NotificationService::AllSources()); | 266 content::NotificationService::AllSources()); |
| 266 } | 267 } |
| OLD | NEW |