| 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 CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_JAVASCRIPT_DIALOG_MANAGER_
H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_JAVASCRIPT_DIALOG_MANAGER_
H_ |
| 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_JAVASCRIPT_DIALOG_MANAGER_
H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_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/shell/browser/shell_javascript_dialog_manager.h" | 11 #include "content/shell/browser/shell_javascript_dialog_manager.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 class LayoutTestJavaScriptDialogManager : public ShellJavaScriptDialogManager { | 15 class LayoutTestJavaScriptDialogManager : public ShellJavaScriptDialogManager { |
| 16 public: | 16 public: |
| 17 LayoutTestJavaScriptDialogManager(); | 17 LayoutTestJavaScriptDialogManager(); |
| 18 virtual ~LayoutTestJavaScriptDialogManager(); | 18 ~LayoutTestJavaScriptDialogManager() override; |
| 19 | 19 |
| 20 // JavaScriptDialogManager: | 20 // JavaScriptDialogManager: |
| 21 virtual void RunJavaScriptDialog( | 21 void RunJavaScriptDialog(WebContents* web_contents, |
| 22 WebContents* web_contents, | 22 const GURL& origin_url, |
| 23 const GURL& origin_url, | 23 const std::string& accept_lang, |
| 24 const std::string& accept_lang, | 24 JavaScriptMessageType javascript_message_type, |
| 25 JavaScriptMessageType javascript_message_type, | 25 const base::string16& message_text, |
| 26 const base::string16& message_text, | 26 const base::string16& default_prompt_text, |
| 27 const base::string16& default_prompt_text, | 27 const DialogClosedCallback& callback, |
| 28 const DialogClosedCallback& callback, | 28 bool* did_suppress_message) override; |
| 29 bool* did_suppress_message) override; | |
| 30 | 29 |
| 31 virtual void RunBeforeUnloadDialog( | 30 void RunBeforeUnloadDialog(WebContents* web_contents, |
| 32 WebContents* web_contents, | 31 const base::string16& message_text, |
| 33 const base::string16& message_text, | 32 bool is_reload, |
| 34 bool is_reload, | 33 const DialogClosedCallback& callback) override; |
| 35 const DialogClosedCallback& callback) override; | |
| 36 | 34 |
| 37 private: | 35 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(LayoutTestJavaScriptDialogManager); | 36 DISALLOW_COPY_AND_ASSIGN(LayoutTestJavaScriptDialogManager); |
| 39 }; | 37 }; |
| 40 | 38 |
| 41 } // namespace content | 39 } // namespace content |
| 42 | 40 |
| 43 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_JAVASCRIPT_DIALOG_MANAG
ER_H_ | 41 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_JAVASCRIPT_DIALOG_MANAG
ER_H_ |
| OLD | NEW |