| OLD | NEW |
| 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 CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JS_MODAL_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JS_MODAL_DIALOG_H_ |
| 6 #define CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JS_MODAL_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JS_MODAL_DIALOG_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool is_before_unload_dialog() const { return is_before_unload_dialog_; } | 75 bool is_before_unload_dialog() const { return is_before_unload_dialog_; } |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 // Notifies the delegate with the result of the dialog. | 78 // Notifies the delegate with the result of the dialog. |
| 79 void NotifyDelegate(bool success, const string16& prompt_text, | 79 void NotifyDelegate(bool success, const string16& prompt_text, |
| 80 bool suppress_js_messages); | 80 bool suppress_js_messages); |
| 81 | 81 |
| 82 // The extra Chrome-only data associated with the delegate_. | 82 // The extra Chrome-only data associated with the delegate_. |
| 83 ChromeJavaScriptDialogExtraData* extra_data_; | 83 ChromeJavaScriptDialogExtraData* extra_data_; |
| 84 | 84 |
| 85 // The client_ as an ExtensionHost, cached for use during notifications that | |
| 86 // may arrive after the client has entered its destructor (and is thus | |
| 87 // treated as a base Delegate). This will be NULL if the |delegate_| is not an | |
| 88 // ExtensionHost. | |
| 89 ExtensionHost* extension_host_; | |
| 90 | |
| 91 // Information about the message box is held in the following variables. | 85 // Information about the message box is held in the following variables. |
| 92 int dialog_flags_; | 86 int dialog_flags_; |
| 93 string16 message_text_; | 87 string16 message_text_; |
| 94 string16 default_prompt_text_; | 88 string16 default_prompt_text_; |
| 95 bool display_suppress_checkbox_; | 89 bool display_suppress_checkbox_; |
| 96 bool is_before_unload_dialog_; | 90 bool is_before_unload_dialog_; |
| 97 IPC::Message* reply_msg_; | 91 IPC::Message* reply_msg_; |
| 98 | 92 |
| 99 // Used only for testing. Specifies alternative prompt text that should be | 93 // Used only for testing. Specifies alternative prompt text that should be |
| 100 // 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. |
| 101 string16 override_prompt_text_; | 95 string16 override_prompt_text_; |
| 102 bool use_override_prompt_text_; | 96 bool use_override_prompt_text_; |
| 103 | 97 |
| 104 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); | 98 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); |
| 105 }; | 99 }; |
| 106 | 100 |
| 107 #endif // CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JS_MODAL_DIALOG_H_ | 101 #endif // CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JS_MODAL_DIALOG_H_ |
| OLD | NEW |