| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void OnAccept(const std::wstring& prompt_text, bool suppress_js_messages); | 71 void OnAccept(const std::wstring& prompt_text, bool suppress_js_messages); |
| 72 void OnClose(); | 72 void OnClose(); |
| 73 | 73 |
| 74 // Accessors | 74 // Accessors |
| 75 int dialog_flags() const { return dialog_flags_; } | 75 int dialog_flags() const { return dialog_flags_; } |
| 76 std::wstring message_text() const { return message_text_; } | 76 std::wstring message_text() const { return message_text_; } |
| 77 std::wstring default_prompt_text() const { return default_prompt_text_; } | 77 std::wstring default_prompt_text() const { return default_prompt_text_; } |
| 78 bool display_suppress_checkbox() const { return display_suppress_checkbox_; } | 78 bool display_suppress_checkbox() const { return display_suppress_checkbox_; } |
| 79 bool is_before_unload_dialog() const { return is_before_unload_dialog_; } | 79 bool is_before_unload_dialog() const { return is_before_unload_dialog_; } |
| 80 | 80 |
| 81 protected: | |
| 82 // Overridden from AppModalDialog: | |
| 83 virtual void Cleanup(); | |
| 84 | |
| 85 private: | 81 private: |
| 86 // Overridden from NotificationObserver: | 82 // Overridden from NotificationObserver: |
| 87 virtual void Observe(NotificationType type, | 83 virtual void Observe(NotificationType type, |
| 88 const NotificationSource& source, | 84 const NotificationSource& source, |
| 89 const NotificationDetails& details); | 85 const NotificationDetails& details); |
| 90 | 86 |
| 91 // Initializes for notifications to listen. | 87 // Initializes for notifications to listen. |
| 92 void InitNotifications(); | 88 void InitNotifications(); |
| 93 | 89 |
| 94 NotificationRegistrar registrar_; | 90 NotificationRegistrar registrar_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 108 std::wstring message_text_; | 104 std::wstring message_text_; |
| 109 std::wstring default_prompt_text_; | 105 std::wstring default_prompt_text_; |
| 110 bool display_suppress_checkbox_; | 106 bool display_suppress_checkbox_; |
| 111 bool is_before_unload_dialog_; | 107 bool is_before_unload_dialog_; |
| 112 IPC::Message* reply_msg_; | 108 IPC::Message* reply_msg_; |
| 113 | 109 |
| 114 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); | 110 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); |
| 115 }; | 111 }; |
| 116 | 112 |
| 117 #endif // CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JS_MODAL_DIALOG_H_ | 113 #endif // CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JS_MODAL_DIALOG_H_ |
| OLD | NEW |