| 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 const std::string& accept_lang, | 21 const std::string& accept_lang, |
| 22 content::JavaScriptMessageType message_type, | 22 content::JavaScriptMessageType message_type, |
| 23 const base::string16& message_text, | 23 const base::string16& message_text, |
| 24 const base::string16& default_prompt_text, | 24 const base::string16& default_prompt_text, |
| 25 const DialogClosedCallback& callback, | 25 const DialogClosedCallback& callback, |
| 26 bool* did_suppress_message) override; | 26 bool* did_suppress_message) override; |
| 27 void RunBeforeUnloadDialog(content::WebContents* web_contents, | 27 void RunBeforeUnloadDialog(content::WebContents* web_contents, |
| 28 const base::string16& message_text, | |
| 29 bool is_reload, | 28 bool is_reload, |
| 30 const DialogClosedCallback& callback) override; | 29 const DialogClosedCallback& callback) override; |
| 31 void CancelActiveAndPendingDialogs( | 30 void CancelActiveAndPendingDialogs( |
| 32 content::WebContents* web_contents) override; | 31 content::WebContents* web_contents) override; |
| 33 void ResetDialogState(content::WebContents* web_contents) override; | 32 void ResetDialogState(content::WebContents* web_contents) override; |
| 34 | 33 |
| 35 private: | 34 private: |
| 36 DISALLOW_COPY_AND_ASSIGN(AwJavaScriptDialogManager); | 35 DISALLOW_COPY_AND_ASSIGN(AwJavaScriptDialogManager); |
| 37 }; | 36 }; |
| 38 | 37 |
| 39 } // namespace android_webview | 38 } // namespace android_webview |
| 40 | 39 |
| 41 #endif // ANDROID_WEBVIEW_BROWSER_AW_JAVASCRIPT_DIALOG_MANAGER_H_ | 40 #endif // ANDROID_WEBVIEW_BROWSER_AW_JAVASCRIPT_DIALOG_MANAGER_H_ |
| OLD | NEW |