Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: chrome/browser/ui/ash/network_connect_delegate_chromeos.cc

Issue 2426473009: mash: Place views Wi-Fi network config dialogs in correct window parent (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/wm_shell.h" 8 #include "ash/common/wm_shell.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "chrome/browser/chromeos/enrollment_dialog_view.h" 10 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
11 #include "chrome/browser/chromeos/options/network_config_view.h"
12 #include "chrome/browser/chromeos/sim_dialog_delegate.h" 11 #include "chrome/browser/chromeos/sim_dialog_delegate.h"
13 #include "chrome/browser/ui/ash/system_tray_client.h" 12 #include "chrome/browser/ui/ash/system_tray_client.h"
14 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" 13 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h"
15 14
16 namespace { 15 namespace {
17 16
18 bool IsUIAvailable() { 17 bool IsUIAvailable() {
19 return ash::WmShell::HasInstance() && 18 return ash::WmShell::HasInstance() &&
20 !ash::WmShell::Get()->GetSessionStateDelegate()->IsScreenLocked(); 19 !ash::WmShell::Get()->GetSessionStateDelegate()->IsScreenLocked();
21 } 20 }
(...skipping 11 matching lines...) Expand all
33 NetworkConnectDelegateChromeOS::NetworkConnectDelegateChromeOS() { 32 NetworkConnectDelegateChromeOS::NetworkConnectDelegateChromeOS() {
34 } 33 }
35 34
36 NetworkConnectDelegateChromeOS::~NetworkConnectDelegateChromeOS() { 35 NetworkConnectDelegateChromeOS::~NetworkConnectDelegateChromeOS() {
37 } 36 }
38 37
39 void NetworkConnectDelegateChromeOS::ShowNetworkConfigure( 38 void NetworkConnectDelegateChromeOS::ShowNetworkConfigure(
40 const std::string& network_id) { 39 const std::string& network_id) {
41 if (!IsUIAvailable()) 40 if (!IsUIAvailable())
42 return; 41 return;
43 NetworkConfigView::Show(network_id, GetNativeWindow()); 42 SystemTrayClient::Get()->ShowNetworkConfigure(network_id);
44 } 43 }
45 44
46 void NetworkConnectDelegateChromeOS::ShowNetworkSettingsForGuid( 45 void NetworkConnectDelegateChromeOS::ShowNetworkSettingsForGuid(
47 const std::string& network_id) { 46 const std::string& network_id) {
48 if (!IsUIAvailable()) 47 if (!IsUIAvailable())
49 return; 48 return;
50 SystemTrayClient::Get()->ShowNetworkSettings(network_id); 49 SystemTrayClient::Get()->ShowNetworkSettings(network_id);
51 } 50 }
52 51
53 bool NetworkConnectDelegateChromeOS::ShowEnrollNetwork( 52 bool NetworkConnectDelegateChromeOS::ShowEnrollNetwork(
(...skipping 11 matching lines...) Expand all
65 } 64 }
66 65
67 void NetworkConnectDelegateChromeOS::ShowMobileSetupDialog( 66 void NetworkConnectDelegateChromeOS::ShowMobileSetupDialog(
68 const std::string& service_path) { 67 const std::string& service_path) {
69 if (!IsUIAvailable()) 68 if (!IsUIAvailable())
70 return; 69 return;
71 MobileSetupDialog::Show(service_path); 70 MobileSetupDialog::Show(service_path);
72 } 71 }
73 72
74 } // namespace chromeos 73 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698