| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/network_connect_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/common/login_status.h" |
| 7 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 8 #include "ash/common/shell_window_ids.h" | 9 #include "ash/common/shell_window_ids.h" |
| 9 #include "ash/common/system/tray/system_tray_delegate.h" | 10 #include "ash/common/system/tray/system_tray_delegate.h" |
| 10 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
| 11 #include "ash/shell.h" | 12 #include "ash/shell.h" |
| 12 #include "ash/system/user/login_status.h" | |
| 13 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 13 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
| 14 #include "chrome/browser/chromeos/options/network_config_view.h" | 14 #include "chrome/browser/chromeos/options/network_config_view.h" |
| 15 #include "chrome/browser/chromeos/sim_dialog_delegate.h" | 15 #include "chrome/browser/chromeos/sim_dialog_delegate.h" |
| 16 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" | 16 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 bool IsUIAvailable() { | 20 bool IsUIAvailable() { |
| 21 return ash::Shell::GetInstance() && | 21 return ash::Shell::GetInstance() && |
| 22 !ash::Shell::GetInstance()->session_state_delegate()->IsScreenLocked(); | 22 !ash::Shell::GetInstance()->session_state_delegate()->IsScreenLocked(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 | 82 |
| 83 void NetworkConnectDelegateChromeOS::ShowMobileSetupDialog( | 83 void NetworkConnectDelegateChromeOS::ShowMobileSetupDialog( |
| 84 const std::string& service_path) { | 84 const std::string& service_path) { |
| 85 if (!IsUIAvailable()) | 85 if (!IsUIAvailable()) |
| 86 return; | 86 return; |
| 87 MobileSetupDialog::Show(service_path); | 87 MobileSetupDialog::Show(service_path); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace chromeos | 90 } // namespace chromeos |
| OLD | NEW |