OLD | NEW |
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_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ |
6 #define CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 content::JavaScriptMessageType javascript_message_type, | 38 content::JavaScriptMessageType javascript_message_type, |
39 const base::string16& message_text, | 39 const base::string16& message_text, |
40 const base::string16& default_prompt_text, | 40 const base::string16& default_prompt_text, |
41 bool display_suppress_checkbox, | 41 bool display_suppress_checkbox, |
42 bool is_before_unload_dialog, | 42 bool is_before_unload_dialog, |
43 bool is_reload, | 43 bool is_reload, |
44 const content::JavaScriptDialogManager::DialogClosedCallback& callback); | 44 const content::JavaScriptDialogManager::DialogClosedCallback& callback); |
45 virtual ~JavaScriptAppModalDialog(); | 45 virtual ~JavaScriptAppModalDialog(); |
46 | 46 |
47 // Overridden from AppModalDialog: | 47 // Overridden from AppModalDialog: |
48 virtual NativeAppModalDialog* CreateNativeDialog() OVERRIDE; | 48 virtual NativeAppModalDialog* CreateNativeDialog() override; |
49 virtual bool IsJavaScriptModalDialog() OVERRIDE; | 49 virtual bool IsJavaScriptModalDialog() override; |
50 virtual void Invalidate() OVERRIDE; | 50 virtual void Invalidate() override; |
51 | 51 |
52 // Callbacks from NativeDialog when the user accepts or cancels the dialog. | 52 // Callbacks from NativeDialog when the user accepts or cancels the dialog. |
53 void OnCancel(bool suppress_js_messages); | 53 void OnCancel(bool suppress_js_messages); |
54 void OnAccept(const base::string16& prompt_text, bool suppress_js_messages); | 54 void OnAccept(const base::string16& prompt_text, bool suppress_js_messages); |
55 | 55 |
56 // NOTE: This is only called under Views, and should be removed. Any critical | 56 // NOTE: This is only called under Views, and should be removed. Any critical |
57 // work should be done in OnCancel or OnAccept. See crbug.com/63732 for more. | 57 // work should be done in OnCancel or OnAccept. See crbug.com/63732 for more. |
58 void OnClose(); | 58 void OnClose(); |
59 | 59 |
60 // Used only for testing. The dialog will use the given text when notifying | 60 // Used only for testing. The dialog will use the given text when notifying |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 // Used only for testing. Specifies alternative prompt text that should be | 93 // Used only for testing. Specifies alternative prompt text that should be |
94 // used when notifying the delegate, if |use_override_prompt_text_| is true. | 94 // used when notifying the delegate, if |use_override_prompt_text_| is true. |
95 base::string16 override_prompt_text_; | 95 base::string16 override_prompt_text_; |
96 bool use_override_prompt_text_; | 96 bool use_override_prompt_text_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); | 98 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); |
99 }; | 99 }; |
100 | 100 |
101 #endif // CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ | 101 #endif // CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ |
OLD | NEW |