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

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

Issue 172633004: Refactor Windows MessageBox fallback code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/ui/views/simple_message_box_win.h ('k') | chrome/chrome_browser_ui.gypi » ('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_win.cc
diff --git a/chrome/browser/ui/views/simple_message_box_win.cc b/chrome/browser/ui/views/simple_message_box_win.cc
deleted file mode 100644
index c769195f4ada1bbafe626335947018e9926ea944..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/simple_message_box_win.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/simple_message_box.h"
-
-#include "ui/base/win/message_box_win.h"
-
-namespace chrome {
-
-MessageBoxResult NativeShowMessageBox(HWND parent,
- const base::string16& title,
- const base::string16& message,
- MessageBoxType type) {
- UINT flags = MB_SETFOREGROUND;
- if (type == MESSAGE_BOX_TYPE_QUESTION) {
- flags |= MB_YESNO;
- } else if (type == MESSAGE_BOX_TYPE_OK_CANCEL) {
- flags |= MB_OKCANCEL;
- } else {
- flags |= MB_OK;
- }
- flags |= ((type == MESSAGE_BOX_TYPE_INFORMATION) ?
- MB_ICONINFORMATION : MB_ICONWARNING);
- int result = ui::MessageBox(parent, message, title, flags);
- return (result == IDYES || result == IDOK) ?
- MESSAGE_BOX_RESULT_YES : MESSAGE_BOX_RESULT_NO;
-}
-
-} // namespace chrome
« no previous file with comments | « chrome/browser/ui/views/simple_message_box_win.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698