| 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 ANDROID_WEBVIEW_BROWSER_AW_JAVASCRIPT_DIALOG_MANAGER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_AW_JAVASCRIPT_DIALOG_MANAGER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/public/browser/javascript_dialog_manager.h" | 9 #include "content/public/browser/javascript_dialog_manager.h" |
| 10 | 10 |
| 11 namespace android_webview { | 11 namespace android_webview { |
| 12 | 12 |
| 13 class AwJavaScriptDialogManager : public content::JavaScriptDialogManager { | 13 class AwJavaScriptDialogManager : public content::JavaScriptDialogManager { |
| 14 public: | 14 public: |
| 15 explicit AwJavaScriptDialogManager(); | 15 explicit AwJavaScriptDialogManager(); |
| 16 ~AwJavaScriptDialogManager() override; | 16 ~AwJavaScriptDialogManager() override; |
| 17 | 17 |
| 18 // Overridden from content::JavaScriptDialogManager: | 18 // Overridden from content::JavaScriptDialogManager: |
| 19 void RunJavaScriptDialog(content::WebContents* web_contents, | 19 void RunJavaScriptDialog(content::WebContents* web_contents, |
| 20 const GURL& origin_url, | 20 const GURL& origin_url, |
| 21 content::JavaScriptMessageType message_type, | 21 content::JavaScriptMessageType message_type, |
| 22 const base::string16& message_text, | 22 const base::string16& message_text, |
| 23 const base::string16& default_prompt_text, | 23 const base::string16& default_prompt_text, |
| 24 const DialogClosedCallback& callback, | 24 const DialogClosedCallback& callback, |
| 25 bool* did_suppress_message) override; | 25 bool* did_suppress_message) override; |
| 26 void RunBeforeUnloadDialog(content::WebContents* web_contents, | 26 void RunBeforeUnloadDialog(content::WebContents* web_contents, |
| 27 bool is_reload, | 27 bool is_reload, |
| 28 const DialogClosedCallback& callback) override; | 28 const DialogClosedCallback& callback) override; |
| 29 void CancelActiveAndPendingDialogs( | 29 void CancelDialogs(content::WebContents* web_contents, |
| 30 content::WebContents* web_contents) override; | 30 bool suppress_callbacks, |
| 31 void ResetDialogState(content::WebContents* web_contents) override; | 31 bool reset_state) override; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(AwJavaScriptDialogManager); | 34 DISALLOW_COPY_AND_ASSIGN(AwJavaScriptDialogManager); |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace android_webview | 37 } // namespace android_webview |
| 38 | 38 |
| 39 #endif // ANDROID_WEBVIEW_BROWSER_AW_JAVASCRIPT_DIALOG_MANAGER_H_ | 39 #endif // ANDROID_WEBVIEW_BROWSER_AW_JAVASCRIPT_DIALOG_MANAGER_H_ |
| OLD | NEW |