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

Side by Side Diff: chrome/browser/ui/views/simple_message_box_win.cc

Issue 7601014: browser: Abstract message box dialog functions into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile on linux_view? Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/simple_message_box.h"
6
7 #include "ui/base/message_box_win.h"
8
9 namespace browser {
10
11 void ShowErrorBox(gfx::NativeWindow parent,
12 const string16& title,
13 const string16& message) {
14 UINT flags = MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST;
15 ui::MessageBox(parent, message, title, flags);
16 }
17
18 bool ShowYesNoBox(gfx::NativeWindow parent,
19 const string16& title,
20 const string16& message) {
21 UINT flags = MB_YESNO | MB_ICONWARNING | MB_SETFOREGROUND;
22 int result = ui::MessageBox(parent, message, title, flags);
23 return result == IDYES;
24 }
25
26 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/about_chrome_view.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698