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