Index: chrome/browser/ui/ash/network_connect_delegate_chromeos.cc |
diff --git a/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc b/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc |
deleted file mode 100644 |
index 4342b467631ded7885af5a321b951f03cc45054b..0000000000000000000000000000000000000000 |
--- a/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc |
+++ /dev/null |
@@ -1,71 +0,0 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" |
- |
-#include "ash/common/session/session_state_delegate.h" |
-#include "ash/common/wm_shell.h" |
-#include "ash/shell.h" |
-#include "chrome/browser/chromeos/enrollment_dialog_view.h" |
-#include "chrome/browser/chromeos/sim_dialog_delegate.h" |
-#include "chrome/browser/ui/ash/system_tray_client.h" |
-#include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" |
- |
-namespace { |
- |
-bool IsUIAvailable() { |
- return ash::WmShell::HasInstance() && |
- !ash::WmShell::Get()->GetSessionStateDelegate()->IsScreenLocked(); |
-} |
- |
-gfx::NativeWindow GetNativeWindow() { |
- int container_id = SystemTrayClient::GetDialogParentContainerId(); |
- return ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), |
- container_id); |
-} |
- |
-} // namespace |
- |
-namespace chromeos { |
- |
-NetworkConnectDelegateChromeOS::NetworkConnectDelegateChromeOS() {} |
- |
-NetworkConnectDelegateChromeOS::~NetworkConnectDelegateChromeOS() {} |
- |
-void NetworkConnectDelegateChromeOS::ShowNetworkConfigure( |
- const std::string& network_id) { |
- if (!IsUIAvailable()) |
- return; |
- SystemTrayClient::Get()->ShowNetworkConfigure(network_id); |
-} |
- |
-void NetworkConnectDelegateChromeOS::ShowNetworkSettings( |
- const std::string& network_id) { |
- if (!IsUIAvailable()) |
- return; |
- SystemTrayClient::Get()->ShowNetworkSettings(network_id); |
-} |
- |
-bool NetworkConnectDelegateChromeOS::ShowEnrollNetwork( |
- const std::string& network_id) { |
- if (!IsUIAvailable()) |
- return false; |
- return enrollment::CreateDialog(network_id, GetNativeWindow()); |
-} |
- |
-void NetworkConnectDelegateChromeOS::ShowMobileSimDialog() { |
- if (!IsUIAvailable()) |
- return; |
- SimDialogDelegate::ShowDialog(GetNativeWindow(), |
- SimDialogDelegate::SIM_DIALOG_UNLOCK); |
-} |
- |
-void NetworkConnectDelegateChromeOS::ShowMobileSetupDialog( |
- const std::string& network_id) { |
- if (!IsUIAvailable()) |
- return; |
- MobileSetupDialog::ShowByNetworkId(network_id); |
-} |
- |
-} // namespace chromeos |