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

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

Issue 2446573003: chromeos: Make "mobile network" and "set time" dialogs work with mash (Closed)
Patch Set: cleanup 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/set_time_dialog.cc
diff --git a/chrome/browser/chromeos/set_time_dialog.cc b/chrome/browser/chromeos/set_time_dialog.cc
index ce3462d9cc52d6f9ded7fed6c7aa407a9f00d632..a9d6906d82da1a45793fe6f242609bd64e3d18a3 100644
--- a/chrome/browser/chromeos/set_time_dialog.cc
+++ b/chrome/browser/chromeos/set_time_dialog.cc
@@ -7,6 +7,7 @@
#include "ash/public/cpp/shell_window_ids.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/web_dialog_util.h"
+#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/user_metrics.h"
#include "ui/gfx/geometry/size.h"
@@ -26,13 +27,18 @@ const int kDefaultHeight = 235;
// static
void SetTimeDialog::ShowDialogInParent(gfx::NativeWindow parent) {
DCHECK(parent);
- ShowDialogImpl(parent, ash::kShellWindowId_Invalid);
+ content::RecordAction(base::UserMetricsAction("Options_SetTimeDialog_Show"));
+ chrome::ShowWebDialog(parent, ProfileManager::GetActiveUserProfile(),
+ new SetTimeDialog());
}
// static
void SetTimeDialog::ShowDialogInContainer(int container_id) {
DCHECK_NE(container_id, ash::kShellWindowId_Invalid);
- ShowDialogImpl(nullptr, container_id);
+ content::RecordAction(base::UserMetricsAction("Options_SetTimeDialog_Show"));
+ chrome::ShowWebDialogInContainer(container_id,
+ ProfileManager::GetActiveUserProfile(),
+ new SetTimeDialog());
}
SetTimeDialog::SetTimeDialog() {
@@ -41,15 +47,6 @@ SetTimeDialog::SetTimeDialog() {
SetTimeDialog::~SetTimeDialog() {
}
-// static
-void SetTimeDialog::ShowDialogImpl(gfx::NativeWindow parent, int container_id) {
- DCHECK(parent || container_id != ash::kShellWindowId_Invalid);
- content::RecordAction(base::UserMetricsAction("Options_SetTimeDialog_Show"));
- chrome::ShowWebDialogWithContainer(parent, container_id,
- ProfileManager::GetActiveUserProfile(),
- new SetTimeDialog());
-}
-
ui::ModalType SetTimeDialog::GetDialogModalType() const {
return ui::MODAL_TYPE_SYSTEM;
}

Powered by Google App Engine
This is Rietveld 408576698