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

Unified Diff: chrome/browser/ui/views/simple_message_box_views.cc

Issue 2469853003: Revert of Use a standard message box for DesktopCastingWarningView. (Closed)
Patch Set: Created 4 years, 1 month 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/ui/simple_message_box.h ('k') | components/constrained_window/constrained_window_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/simple_message_box_views.cc
diff --git a/chrome/browser/ui/views/simple_message_box_views.cc b/chrome/browser/ui/views/simple_message_box_views.cc
index 91c219394eff2a5b098cd8d88d6deecae3c9b67b..4eee13d9bbbd578f364f10bd44db81ef41033ce1 100644
--- a/chrome/browser/ui/views/simple_message_box_views.cc
+++ b/chrome/browser/ui/views/simple_message_box_views.cc
@@ -72,9 +72,6 @@
DISALLOW_COPY_AND_ASSIGN(SimpleMessageBoxViews);
};
-
-// The currently showing message box, if there is one. Used for tests.
-SimpleMessageBoxViews* g_current_message_box = nullptr;
////////////////////////////////////////////////////////////////////////////////
// SimpleMessageBoxViews, public:
@@ -115,7 +112,6 @@
}
MessageBoxResult SimpleMessageBoxViews::RunDialogAndGetResult() {
- g_current_message_box = this;
MessageBoxResult result = MESSAGE_BOX_RESULT_NO;
result_ = &result;
// TODO(pkotwicz): Exit message loop when the dialog is closed by some other
@@ -125,7 +121,6 @@
base::RunLoop run_loop;
quit_runloop_ = run_loop.QuitClosure();
run_loop.Run();
- g_current_message_box = nullptr;
return result;
}
@@ -252,17 +247,6 @@
} // namespace
-bool CloseMessageBoxForTest(bool accept) {
- if (!g_current_message_box)
- return false;
-
- if (accept)
- g_current_message_box->Accept();
- else
- g_current_message_box->Cancel();
- return true;
-}
-
void ShowWarningMessageBox(gfx::NativeWindow parent,
const base::string16& title,
const base::string16& message) {
« no previous file with comments | « chrome/browser/ui/simple_message_box.h ('k') | components/constrained_window/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698