| 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 COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ | 5 #ifndef COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ |
| 6 #define COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ | 6 #define COMPONENTS_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" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "components/app_modal_dialogs/app_modal_dialog.h" | 13 #include "components/app_modal_dialogs/app_modal_dialog.h" |
| 14 #include "content/public/browser/javascript_dialog_manager.h" | 14 #include "content/public/browser/javascript_dialog_manager.h" |
| 15 | 15 |
| 16 namespace app_modal_dialogs { |
| 17 |
| 16 // Extra data for JavaScript dialogs to add Chrome-only features. | 18 // Extra data for JavaScript dialogs to add Chrome-only features. |
| 17 class ChromeJavaScriptDialogExtraData { | 19 class ChromeJavaScriptDialogExtraData { |
| 18 public: | 20 public: |
| 19 ChromeJavaScriptDialogExtraData(); | 21 ChromeJavaScriptDialogExtraData(); |
| 20 | 22 |
| 21 // The time that the last JavaScript dialog was dismissed. | 23 // The time that the last JavaScript dialog was dismissed. |
| 22 base::TimeTicks last_javascript_message_dismissal_; | 24 base::TimeTicks last_javascript_message_dismissal_; |
| 23 | 25 |
| 24 // True if the user has decided to block future JavaScript dialogs. | 26 // True if the user has decided to block future JavaScript dialogs. |
| 25 bool suppress_javascript_messages_; | 27 bool suppress_javascript_messages_; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 content::JavaScriptDialogManager::DialogClosedCallback callback_; | 93 content::JavaScriptDialogManager::DialogClosedCallback callback_; |
| 92 | 94 |
| 93 // Used only for testing. Specifies alternative prompt text that should be | 95 // Used only for testing. Specifies alternative prompt text that should be |
| 94 // used when notifying the delegate, if |use_override_prompt_text_| is true. | 96 // used when notifying the delegate, if |use_override_prompt_text_| is true. |
| 95 base::string16 override_prompt_text_; | 97 base::string16 override_prompt_text_; |
| 96 bool use_override_prompt_text_; | 98 bool use_override_prompt_text_; |
| 97 | 99 |
| 98 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); | 100 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); |
| 99 }; | 101 }; |
| 100 | 102 |
| 103 } // namespace app_modal_dialogs |
| 104 |
| 101 #endif // COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ | 105 #endif // COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_APP_MODAL_DIALOG_H_ |
| OLD | NEW |