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_JAVASCRIPT_APP_MODAL_DIALOG_H_ | 5 #ifndef COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_ |
6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_ | 6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 const base::string16& default_prompt_text, | 45 const base::string16& default_prompt_text, |
46 bool display_suppress_checkbox, | 46 bool display_suppress_checkbox, |
47 bool is_before_unload_dialog, | 47 bool is_before_unload_dialog, |
48 bool is_reload, | 48 bool is_reload, |
49 const content::JavaScriptDialogManager::DialogClosedCallback& callback); | 49 const content::JavaScriptDialogManager::DialogClosedCallback& callback); |
50 ~JavaScriptAppModalDialog() override; | 50 ~JavaScriptAppModalDialog() override; |
51 | 51 |
52 // Overridden from AppModalDialog: | 52 // Overridden from AppModalDialog: |
53 NativeAppModalDialog* CreateNativeDialog() override; | 53 NativeAppModalDialog* CreateNativeDialog() override; |
54 bool IsJavaScriptModalDialog() override; | 54 bool IsJavaScriptModalDialog() override; |
55 void Invalidate() override; | 55 void Invalidate(bool suppress_callbacks) override; |
56 | 56 |
57 // Callbacks from NativeDialog when the user accepts or cancels the dialog. | 57 // Callbacks from NativeDialog when the user accepts or cancels the dialog. |
58 void OnCancel(bool suppress_js_messages); | 58 void OnCancel(bool suppress_js_messages); |
59 void OnAccept(const base::string16& prompt_text, bool suppress_js_messages); | 59 void OnAccept(const base::string16& prompt_text, bool suppress_js_messages); |
60 | 60 |
61 // NOTE: This is only called under Views, and should be removed. Any critical | 61 // NOTE: This is only called under Views, and should be removed. Any critical |
62 // work should be done in OnCancel or OnAccept. See crbug.com/63732 for more. | 62 // work should be done in OnCancel or OnAccept. See crbug.com/63732 for more. |
63 void OnClose(); | 63 void OnClose(); |
64 | 64 |
65 // Used only for testing. The dialog will use the given text when notifying | 65 // Used only for testing. The dialog will use the given text when notifying |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 bool use_override_prompt_text_; | 104 bool use_override_prompt_text_; |
105 | 105 |
106 base::TimeTicks creation_time_; | 106 base::TimeTicks creation_time_; |
107 | 107 |
108 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); | 108 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); |
109 }; | 109 }; |
110 | 110 |
111 } // namespace app_modal | 111 } // namespace app_modal |
112 | 112 |
113 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_ | 113 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_ |
OLD | NEW |