| Index: chrome/browser/ui/webui/settings/chromeos/internet_handler.cc
|
| diff --git a/chrome/browser/ui/webui/settings/chromeos/internet_handler.cc b/chrome/browser/ui/webui/settings/chromeos/internet_handler.cc
|
| index 8d29c203a96abd261f14789c675346dd774d2b7b..fc8162af2a22d931e1ad405d7aee14d3f9c5863d 100644
|
| --- a/chrome/browser/ui/webui/settings/chromeos/internet_handler.cc
|
| +++ b/chrome/browser/ui/webui/settings/chromeos/internet_handler.cc
|
| @@ -18,6 +18,7 @@
|
| #include "extensions/browser/api/vpn_provider/vpn_service.h"
|
| #include "extensions/browser/api/vpn_provider/vpn_service_factory.h"
|
| #include "third_party/cros_system_api/dbus/service_constants.h"
|
| +#include "ui/views/widget/widget_parent.h"
|
|
|
| namespace chromeos {
|
|
|
| @@ -74,7 +75,7 @@ void InternetHandler::AddNetwork(const base::ListValue* args) {
|
| args->GetString(1, &extension_id);
|
| if (extension_id.empty()) {
|
| // Show the "add network" dialog for the built-in OpenVPN/L2TP provider.
|
| - NetworkConfigView::ShowForType(shill::kTypeVPN, GetNativeWindow());
|
| + NetworkConfigView::ShowForType(shill::kTypeVPN, GetWidgetParent());
|
| return;
|
| }
|
| // Request that the third-party VPN provider identified by |provider_id|
|
| @@ -82,7 +83,7 @@ void InternetHandler::AddNetwork(const base::ListValue* args) {
|
| VpnServiceFactory::GetForBrowserContext(GetProfileForPrimaryUser())
|
| ->SendShowAddDialogToExtension(extension_id);
|
| } else if (onc_type == ::onc::network_type::kWiFi) {
|
| - NetworkConfigView::ShowForType(shill::kTypeWifi, GetNativeWindow());
|
| + NetworkConfigView::ShowForType(shill::kTypeWifi, GetWidgetParent());
|
| } else if (onc_type == ::onc::network_type::kCellular) {
|
| ChooseMobileNetworkDialog::ShowDialog(GetNativeWindow());
|
| } else {
|
| @@ -121,12 +122,18 @@ void InternetHandler::ConfigureNetwork(const base::ListValue* args) {
|
| return;
|
| }
|
|
|
| - NetworkConfigView::Show(service_path, GetNativeWindow());
|
| + NetworkConfigView::Show(service_path, GetWidgetParent());
|
| }
|
|
|
| gfx::NativeWindow InternetHandler::GetNativeWindow() const {
|
| return web_ui()->GetWebContents()->GetTopLevelNativeWindow();
|
| }
|
|
|
| +views::WidgetParent InternetHandler::GetWidgetParent() const {
|
| + views::WidgetParent widget_parent;
|
| + widget_parent.native_parent = GetNativeWindow();
|
| + return widget_parent;
|
| +}
|
| +
|
| } // namespace settings
|
| } // namespace chromeos
|
|
|