| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/webui/settings/chromeos/internet_handler.h" | 5 #include "chrome/browser/ui/webui/settings/chromeos/internet_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/chromeos/options/network_config_view.h" | 9 #include "chrome/browser/chromeos/options/network_config_view.h" |
| 10 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 10 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 if (network->type() == shill::kTypeVPN && | 114 if (network->type() == shill::kTypeVPN && |
| 115 network->vpn_provider_type() == shill::kProviderThirdPartyVpn) { | 115 network->vpn_provider_type() == shill::kProviderThirdPartyVpn) { |
| 116 // Request that the third-party VPN provider used by the |network| show a | 116 // Request that the third-party VPN provider used by the |network| show a |
| 117 // configuration dialog for it. | 117 // configuration dialog for it. |
| 118 VpnServiceFactory::GetForBrowserContext(GetProfileForPrimaryUser()) | 118 VpnServiceFactory::GetForBrowserContext(GetProfileForPrimaryUser()) |
| 119 ->SendShowConfigureDialogToExtension( | 119 ->SendShowConfigureDialogToExtension( |
| 120 network->third_party_vpn_provider_extension_id(), network->name()); | 120 network->third_party_vpn_provider_extension_id(), network->name()); |
| 121 return; | 121 return; |
| 122 } | 122 } |
| 123 | 123 |
| 124 NetworkConfigView::Show(service_path, GetNativeWindow()); | 124 NetworkConfigView::ShowInParent(network->guid(), GetNativeWindow()); |
| 125 } | 125 } |
| 126 | 126 |
| 127 gfx::NativeWindow InternetHandler::GetNativeWindow() const { | 127 gfx::NativeWindow InternetHandler::GetNativeWindow() const { |
| 128 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); | 128 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace settings | 131 } // namespace settings |
| 132 } // namespace chromeos | 132 } // namespace chromeos |
| OLD | NEW |