| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 6 #define CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const base::string16& message_text, | 29 const base::string16& message_text, |
| 30 const base::string16& default_prompt_text, | 30 const base::string16& default_prompt_text, |
| 31 const DialogClosedCallback& callback, | 31 const DialogClosedCallback& callback, |
| 32 bool* did_suppress_message) override; | 32 bool* did_suppress_message) override; |
| 33 | 33 |
| 34 void RunBeforeUnloadDialog(WebContents* web_contents, | 34 void RunBeforeUnloadDialog(WebContents* web_contents, |
| 35 bool is_reload, | 35 bool is_reload, |
| 36 const DialogClosedCallback& callback) override; | 36 const DialogClosedCallback& callback) override; |
| 37 | 37 |
| 38 void CancelDialogs(WebContents* web_contents, | 38 void CancelDialogs(WebContents* web_contents, |
| 39 bool suppress_callbacks, | |
| 40 bool reset_state) override; | 39 bool reset_state) override; |
| 41 | 40 |
| 42 // Called by the ShellJavaScriptDialog when it closes. | 41 // Called by the ShellJavaScriptDialog when it closes. |
| 43 void DialogClosed(ShellJavaScriptDialog* dialog); | 42 void DialogClosed(ShellJavaScriptDialog* dialog); |
| 44 | 43 |
| 45 // Used for content_browsertests. | 44 // Used for content_browsertests. |
| 46 void set_dialog_request_callback(const base::Closure& callback) { | 45 void set_dialog_request_callback(const base::Closure& callback) { |
| 47 dialog_request_callback_ = callback; | 46 dialog_request_callback_ = callback; |
| 48 } | 47 } |
| 49 void set_should_proceed_on_beforeunload(bool proceed) { | 48 void set_should_proceed_on_beforeunload(bool proceed) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 65 bool should_proceed_on_beforeunload_; | 64 bool should_proceed_on_beforeunload_; |
| 66 | 65 |
| 67 DialogClosedCallback before_unload_callback_; | 66 DialogClosedCallback before_unload_callback_; |
| 68 | 67 |
| 69 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogManager); | 68 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogManager); |
| 70 }; | 69 }; |
| 71 | 70 |
| 72 } // namespace content | 71 } // namespace content |
| 73 | 72 |
| 74 #endif // CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ | 73 #endif // CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| OLD | NEW |