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 14 matching lines...) Expand all Loading... |
25 const base::string16& message_text, | 25 const base::string16& message_text, |
26 const base::string16& default_prompt_text, | 26 const base::string16& default_prompt_text, |
27 const DialogClosedCallback& callback, | 27 const DialogClosedCallback& callback, |
28 bool* did_suppress_message) override; | 28 bool* did_suppress_message) override; |
29 void RunBeforeUnloadDialog(content::WebContents* web_contents, | 29 void RunBeforeUnloadDialog(content::WebContents* web_contents, |
30 bool is_reload, | 30 bool is_reload, |
31 const DialogClosedCallback& callback) override; | 31 const DialogClosedCallback& callback) override; |
32 bool HandleJavaScriptDialog(content::WebContents* web_contents, | 32 bool HandleJavaScriptDialog(content::WebContents* web_contents, |
33 bool accept, | 33 bool accept, |
34 const base::string16* prompt_override) override; | 34 const base::string16* prompt_override) override; |
35 void CancelActiveAndPendingDialogs( | 35 void CancelDialogs(content::WebContents* web_contents, |
36 content::WebContents* web_contents) override; | 36 bool suppress_callbacks, |
37 void ResetDialogState(content::WebContents* web_contents) override; | 37 bool reset_state) override; |
38 | 38 |
39 private: | 39 private: |
40 void OnPermissionResponse( | 40 void OnPermissionResponse( |
41 const DialogClosedCallback& callback, | 41 const DialogClosedCallback& callback, |
42 bool allow, | 42 bool allow, |
43 const std::string& user_input); | 43 const std::string& user_input); |
44 | 44 |
45 // Pointer to the webview that is being helped. | 45 // Pointer to the webview that is being helped. |
46 WebViewGuest* const web_view_guest_; | 46 WebViewGuest* const web_view_guest_; |
47 | 47 |
48 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogHelper); | 48 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogHelper); |
49 }; | 49 }; |
50 | 50 |
51 } // namespace extensions | 51 } // namespace extensions |
52 | 52 |
53 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_H_ | 53 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_H_ |
OLD | NEW |