OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "content/public/browser/javascript_dialog_manager.h" | 11 #include "content/public/browser/javascript_dialog_manager.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class ShellJavaScriptDialog; | 15 class ShellJavaScriptDialog; |
16 | 16 |
17 class ShellJavaScriptDialogManager : public JavaScriptDialogManager { | 17 class ShellJavaScriptDialogManager : public JavaScriptDialogManager { |
18 public: | 18 public: |
19 ShellJavaScriptDialogManager(); | 19 ShellJavaScriptDialogManager(); |
20 virtual ~ShellJavaScriptDialogManager(); | 20 virtual ~ShellJavaScriptDialogManager(); |
21 | 21 |
22 // JavaScriptDialogManager: | 22 // JavaScriptDialogManager: |
23 virtual void RunJavaScriptDialog( | 23 virtual void RunJavaScriptDialog( |
24 WebContents* web_contents, | 24 WebContents* web_contents, |
25 const GURL& origin_url, | 25 const GURL& origin_url, |
26 const std::string& accept_lang, | 26 const std::string& accept_lang, |
27 JavaScriptMessageType javascript_message_type, | 27 JavaScriptMessageType javascript_message_type, |
28 const string16& message_text, | 28 const base::string16& message_text, |
29 const string16& default_prompt_text, | 29 const base::string16& default_prompt_text, |
30 const DialogClosedCallback& callback, | 30 const DialogClosedCallback& callback, |
31 bool* did_suppress_message) OVERRIDE; | 31 bool* did_suppress_message) OVERRIDE; |
32 | 32 |
33 virtual void RunBeforeUnloadDialog( | 33 virtual void RunBeforeUnloadDialog( |
34 WebContents* web_contents, | 34 WebContents* web_contents, |
35 const string16& message_text, | 35 const base::string16& message_text, |
36 bool is_reload, | 36 bool is_reload, |
37 const DialogClosedCallback& callback) OVERRIDE; | 37 const DialogClosedCallback& callback) OVERRIDE; |
38 | 38 |
39 virtual void CancelActiveAndPendingDialogs( | 39 virtual void CancelActiveAndPendingDialogs( |
40 WebContents* web_contents) OVERRIDE; | 40 WebContents* web_contents) OVERRIDE; |
41 | 41 |
42 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; | 42 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; |
43 | 43 |
44 // Called by the ShellJavaScriptDialog when it closes. | 44 // Called by the ShellJavaScriptDialog when it closes. |
45 void DialogClosed(ShellJavaScriptDialog* dialog); | 45 void DialogClosed(ShellJavaScriptDialog* dialog); |
(...skipping 12 matching lines...) Expand all Loading... |
58 #endif | 58 #endif |
59 | 59 |
60 base::Closure dialog_request_callback_; | 60 base::Closure dialog_request_callback_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogManager); | 62 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogManager); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace content | 65 } // namespace content |
66 | 66 |
67 #endif // CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ | 67 #endif // CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ |
OLD | NEW |