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

Side by Side Diff: chrome/browser/ui/simple_message_box.h

Issue 2441403003: Use a standard message box for DesktopCastingWarningView. (Closed)
Patch Set: msw review 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_SIMPLE_MESSAGE_BOX_H_ 5 #ifndef CHROME_BROWSER_UI_SIMPLE_MESSAGE_BOX_H_
6 #define CHROME_BROWSER_UI_SIMPLE_MESSAGE_BOX_H_ 6 #define CHROME_BROWSER_UI_SIMPLE_MESSAGE_BOX_H_
7 7
8 #include "base/compiler_specific.h"
8 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
9 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
10 11
11 namespace chrome { 12 namespace chrome {
12 13
13 enum MessageBoxResult { 14 enum MessageBoxResult {
14 // User chose NO or CANCEL. If there's a checkbox, then the checkbox was 15 // User chose NO or CANCEL. If there's a checkbox, then the checkbox was
15 // unchecked. 16 // unchecked.
16 MESSAGE_BOX_RESULT_NO = 0, 17 MESSAGE_BOX_RESULT_NO = 0,
17 18
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // 55 //
55 // NOTE: In general, you should avoid this since it's usually poor UI. 56 // NOTE: In general, you should avoid this since it's usually poor UI.
56 // We have a variety of other surfaces such as app menu notifications and 57 // We have a variety of other surfaces such as app menu notifications and
57 // infobars; consult the UI leads for a recommendation. 58 // infobars; consult the UI leads for a recommendation.
58 MessageBoxResult ShowMessageBoxWithButtonText(gfx::NativeWindow parent, 59 MessageBoxResult ShowMessageBoxWithButtonText(gfx::NativeWindow parent,
59 const base::string16& title, 60 const base::string16& title,
60 const base::string16& message, 61 const base::string16& message,
61 const base::string16& yes_text, 62 const base::string16& yes_text,
62 const base::string16& no_text); 63 const base::string16& no_text);
63 64
65 // Closes the current message box, if any, accepting or declining based on
66 // |accept|. Returns whether there was a message box showing.
67 bool CloseMessageBoxForTest(bool accept) WARN_UNUSED_RESULT;
68
64 } // namespace chrome 69 } // namespace chrome
65 70
66 #endif // CHROME_BROWSER_UI_SIMPLE_MESSAGE_BOX_H_ 71 #endif // CHROME_BROWSER_UI_SIMPLE_MESSAGE_BOX_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/simple_message_box_mac.mm ('k') | chrome/browser/ui/views/simple_message_box_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698