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

Unified Diff: chrome/browser/chromeos/sim_dialog_delegate.cc

Issue 2452283003: chromeos: Make network enrollment and SIM unlock dialogs work with mash (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/sim_dialog_delegate.h ('k') | chrome/browser/ui/ash/system_tray_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/sim_dialog_delegate.cc
diff --git a/chrome/browser/chromeos/sim_dialog_delegate.cc b/chrome/browser/chromeos/sim_dialog_delegate.cc
index babd901ee49b2ac231a927a5de285c8ad0e436c8..f21fde7f6caf59ffdd684c1bdd4845c911c45656 100644
--- a/chrome/browser/chromeos/sim_dialog_delegate.cc
+++ b/chrome/browser/chromeos/sim_dialog_delegate.cc
@@ -6,6 +6,7 @@
#include "base/strings/stringprintf.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/ui/ash/system_tray_client.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/common/url_constants.h"
#include "ui/gfx/geometry/size.h"
@@ -35,9 +36,14 @@ namespace chromeos {
// static
void SimDialogDelegate::ShowDialog(gfx::NativeWindow owning_window,
SimDialogMode mode) {
- chrome::ShowWebDialog(owning_window,
- ProfileManager::GetActiveUserProfile(),
- new SimDialogDelegate(mode));
+ Profile* profile = ProfileManager::GetActiveUserProfile();
+ if (owning_window) {
+ chrome::ShowWebDialog(owning_window, profile, new SimDialogDelegate(mode));
+ } else {
+ chrome::ShowWebDialogInContainer(
+ SystemTrayClient::GetDialogParentContainerId(), profile,
+ new SimDialogDelegate(mode));
+ }
}
SimDialogDelegate::SimDialogDelegate(SimDialogMode dialog_mode)
« no previous file with comments | « chrome/browser/chromeos/sim_dialog_delegate.h ('k') | chrome/browser/ui/ash/system_tray_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698