OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 void RunJavaScriptDialog( | 21 void RunJavaScriptDialog( |
22 content::WebContents* web_contents, | 22 content::WebContents* web_contents, |
23 const GURL& origin_url, | 23 const GURL& origin_url, |
24 const std::string& accept_lang, | 24 const std::string& accept_lang, |
25 content::JavaScriptMessageType javascript_message_type, | 25 content::JavaScriptMessageType javascript_message_type, |
26 const base::string16& message_text, | 26 const base::string16& message_text, |
27 const base::string16& default_prompt_text, | 27 const base::string16& default_prompt_text, |
28 const DialogClosedCallback& callback, | 28 const DialogClosedCallback& callback, |
29 bool* did_suppress_message) override; | 29 bool* did_suppress_message) override; |
30 void RunBeforeUnloadDialog(content::WebContents* web_contents, | 30 void RunBeforeUnloadDialog(content::WebContents* web_contents, |
31 const base::string16& message_text, | |
32 bool is_reload, | 31 bool is_reload, |
33 const DialogClosedCallback& callback) override; | 32 const DialogClosedCallback& callback) override; |
34 bool HandleJavaScriptDialog(content::WebContents* web_contents, | 33 bool HandleJavaScriptDialog(content::WebContents* web_contents, |
35 bool accept, | 34 bool accept, |
36 const base::string16* prompt_override) override; | 35 const base::string16* prompt_override) override; |
37 void CancelActiveAndPendingDialogs( | 36 void CancelActiveAndPendingDialogs( |
38 content::WebContents* web_contents) override; | 37 content::WebContents* web_contents) override; |
39 void ResetDialogState(content::WebContents* web_contents) override; | 38 void ResetDialogState(content::WebContents* web_contents) override; |
40 | 39 |
41 private: | 40 private: |
42 void OnPermissionResponse( | 41 void OnPermissionResponse( |
43 const DialogClosedCallback& callback, | 42 const DialogClosedCallback& callback, |
44 bool allow, | 43 bool allow, |
45 const std::string& user_input); | 44 const std::string& user_input); |
46 | 45 |
47 // Pointer to the webview that is being helped. | 46 // Pointer to the webview that is being helped. |
48 WebViewGuest* const web_view_guest_; | 47 WebViewGuest* const web_view_guest_; |
49 | 48 |
50 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogHelper); | 49 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogHelper); |
51 }; | 50 }; |
52 | 51 |
53 } // namespace extensions | 52 } // namespace extensions |
54 | 53 |
55 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_H_ | 54 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_H_ |
OLD | NEW |