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

Unified Diff: chrome/browser/chromeos/options/network_config_view.h

Issue 2426473009: mash: Place views Wi-Fi network config dialogs in correct window parent (Closed)
Patch Set: review comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/options/network_config_view.h
diff --git a/chrome/browser/chromeos/options/network_config_view.h b/chrome/browser/chromeos/options/network_config_view.h
index 3df14324b9579293e61002a5d5236c00d6f92528..0ffd10c0ca5d9bd6301da64885bac0b92cc3db3c 100644
--- a/chrome/browser/chromeos/options/network_config_view.h
+++ b/chrome/browser/chromeos/options/network_config_view.h
@@ -44,12 +44,15 @@ class NetworkConfigView : public views::DialogDelegateView,
virtual ~Delegate() {}
};
- // Shows a network connection dialog if none is currently visible.
- static void Show(const std::string& service_path, gfx::NativeWindow parent);
+ // Shows a network connection dialog if none is currently visible. The dialog
+ // will be a child of |parent| (e.g. the webui settings window) which ensures
+ // it appears on the display the user is looking at.
+ static void ShowInParent(const std::string& network_id,
+ gfx::NativeWindow parent);
- // Same as above but takes a network id (GUID) instead.
- static void ShowByNetworkId(const std::string& network_id,
- gfx::NativeWindow parent);
+ // Same as above but places the dialog in the given container on the primary
+ // display. Used as a fallback when no parent is available.
+ static void ShowInContainer(const std::string& network_id, int container_id);
// Shows a dialog to configure a new network. |type| must be a valid Shill
// 'Type' property value.
@@ -91,8 +94,9 @@ class NetworkConfigView : public views::DialogDelegateView,
NetworkConfigView();
~NetworkConfigView() override;
- static void ShowByNetwork(const NetworkState* network,
- gfx::NativeWindow parent);
+ static void ShowImpl(const std::string& network_id,
+ gfx::NativeWindow parent,
+ int container_id);
// Login dialog for known networks. Returns true if successfully created.
bool InitWithNetworkState(const NetworkState* network);
@@ -101,6 +105,7 @@ class NetworkConfigView : public views::DialogDelegateView,
// Creates and shows a dialog containing this view.
void ShowDialog(gfx::NativeWindow parent);
+ void ShowDialogInContainer(int container_id);
// Resets the underlying view to show advanced options.
void ShowAdvancedView();
« no previous file with comments | « ash/common/wm/system_modal_container_layout_manager.cc ('k') | chrome/browser/chromeos/options/network_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698