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

Side by Side Diff: content/browser/javascript_dialogs.h

Issue 8553001: views: Add an Options enum to MessageBoxView control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 9 years 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 CONTENT_BROWSER_JAVASCRIPT_DIALOGS_H_ 5 #ifndef CONTENT_BROWSER_JAVASCRIPT_DIALOGS_H_
6 #define CONTENT_BROWSER_JAVASCRIPT_DIALOGS_H_ 6 #define CONTENT_BROWSER_JAVASCRIPT_DIALOGS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "ui/base/message_box_type.h"
11 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
12 13
13 namespace IPC { 14 namespace IPC {
14 class Message; 15 class Message;
15 } 16 }
16 17
17 namespace content { 18 namespace content {
18 19
19 class CONTENT_EXPORT DialogDelegate { 20 class CONTENT_EXPORT DialogDelegate {
20 public: 21 public:
(...skipping 28 matching lines...) Expand all
49 DIALOG_TITLE_NONE, 50 DIALOG_TITLE_NONE,
50 DIALOG_TITLE_PLAIN_STRING, 51 DIALOG_TITLE_PLAIN_STRING,
51 DIALOG_TITLE_FORMATTED_URL 52 DIALOG_TITLE_FORMATTED_URL
52 }; 53 };
53 54
54 // Displays a JavaScript dialog. |did_suppress_message| will not be nil; if 55 // Displays a JavaScript dialog. |did_suppress_message| will not be nil; if
55 // |true| is returned in it, the caller will handle faking the reply. 56 // |true| is returned in it, the caller will handle faking the reply.
56 virtual void RunJavaScriptDialog(JavaScriptDialogDelegate* delegate, 57 virtual void RunJavaScriptDialog(JavaScriptDialogDelegate* delegate,
57 TitleType title_type, 58 TitleType title_type,
58 const string16& title, 59 const string16& title,
59 int dialog_flags, 60 ui::MessageBoxType message_box_type,
60 const string16& message_text, 61 const string16& message_text,
61 const string16& default_prompt_text, 62 const string16& default_prompt_text,
62 IPC::Message* reply_message, 63 IPC::Message* reply_message,
63 bool* did_suppress_message) = 0; 64 bool* did_suppress_message) = 0;
64 65
65 // Displays a dialog asking the user if they want to leave a page. 66 // Displays a dialog asking the user if they want to leave a page.
66 virtual void RunBeforeUnloadDialog(JavaScriptDialogDelegate* delegate, 67 virtual void RunBeforeUnloadDialog(JavaScriptDialogDelegate* delegate,
67 const string16& message_text, 68 const string16& message_text,
68 IPC::Message* reply_message) = 0; 69 IPC::Message* reply_message) = 0;
69 70
70 // Cancels all pending dialogs and resets any saved JavaScript dialog state 71 // Cancels all pending dialogs and resets any saved JavaScript dialog state
71 // for the delegate. 72 // for the delegate.
72 virtual void ResetJavaScriptState(JavaScriptDialogDelegate* delegate) = 0; 73 virtual void ResetJavaScriptState(JavaScriptDialogDelegate* delegate) = 0;
73 74
74 protected: 75 protected:
75 virtual ~JavaScriptDialogCreator() {} 76 virtual ~JavaScriptDialogCreator() {}
76 }; 77 };
77 78
78 } // namespace content 79 } // namespace content
79 80
80 #endif // CONTENT_BROWSER_JAVASCRIPT_DIALOGS_H_ 81 #endif // CONTENT_BROWSER_JAVASCRIPT_DIALOGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698