| Index: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| index 1bf90c7cc2dc91929a9ea0f84ec1c41b3b71cda1..786276123293a0ee54bdb146cb04350fec6436e5 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| @@ -38,6 +38,7 @@
|
| #include "third_party/cros_system_api/dbus/service_constants.h"
|
| #include "ui/base/webui/web_ui_util.h"
|
| #include "ui/chromeos/network/network_connect.h"
|
| +#include "ui/views/widget/widget_parent.h"
|
|
|
| namespace chromeos {
|
| namespace options {
|
| @@ -190,6 +191,12 @@ gfx::NativeWindow InternetOptionsHandler::GetNativeWindow() const {
|
| return web_ui()->GetWebContents()->GetTopLevelNativeWindow();
|
| }
|
|
|
| +views::WidgetParent InternetOptionsHandler::GetWidgetParent() const {
|
| + views::WidgetParent widget_parent;
|
| + widget_parent.native_parent = GetNativeWindow();
|
| + return widget_parent;
|
| +}
|
| +
|
| const PrefService* InternetOptionsHandler::GetPrefs() const {
|
| return Profile::FromWebUI(web_ui())->GetPrefs();
|
| }
|
| @@ -198,7 +205,7 @@ const PrefService* InternetOptionsHandler::GetPrefs() const {
|
| void InternetOptionsHandler::AddVPNConnection(const base::ListValue* args) {
|
| if (args->empty()) {
|
| // Show the "add network" dialog for the built-in OpenVPN/L2TP provider.
|
| - NetworkConfigView::ShowForType(shill::kTypeVPN, GetNativeWindow());
|
| + NetworkConfigView::ShowForType(shill::kTypeVPN, GetWidgetParent());
|
| return;
|
| }
|
|
|
| @@ -221,7 +228,7 @@ void InternetOptionsHandler::AddNonVPNConnection(const base::ListValue* args) {
|
| return;
|
| }
|
| 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 {
|
| @@ -263,7 +270,7 @@ void InternetOptionsHandler::ConfigureNetwork(const base::ListValue* args) {
|
| return;
|
| }
|
|
|
| - NetworkConfigView::Show(service_path, GetNativeWindow());
|
| + NetworkConfigView::Show(service_path, GetWidgetParent());
|
| }
|
|
|
| } // namespace options
|
|
|