| 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 CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_CREATOR_H_ | 5 #ifndef CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 6 #define CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_CREATOR_H_ | 6 #define CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" |
| 8 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 9 #include "base/callback_forward.h" | |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/public/browser/javascript_dialogs.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 ShellJavaScriptDialogCreator : public JavaScriptDialogCreator { | 17 class ShellJavaScriptDialogManager : public JavaScriptDialogManager { |
| 18 public: | 18 public: |
| 19 ShellJavaScriptDialogCreator(); | 19 ShellJavaScriptDialogManager(); |
| 20 virtual ~ShellJavaScriptDialogCreator(); | 20 virtual ~ShellJavaScriptDialogManager(); |
| 21 | 21 |
| 22 // JavaScriptDialogCreator: | 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 string16& message_text, |
| 29 const string16& default_prompt_text, | 29 const 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 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 49 private: | 49 private: |
| 50 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) | 50 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) |
| 51 // The dialog being shown. No queueing. | 51 // The dialog being shown. No queueing. |
| 52 scoped_ptr<ShellJavaScriptDialog> dialog_; | 52 scoped_ptr<ShellJavaScriptDialog> dialog_; |
| 53 #else | 53 #else |
| 54 // TODO: implement ShellJavaScriptDialog for other platforms, drop this #if | 54 // TODO: implement ShellJavaScriptDialog for other platforms, drop this #if |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 base::Closure dialog_request_callback_; | 57 base::Closure dialog_request_callback_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogCreator); | 59 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogManager); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace content | 62 } // namespace content |
| 63 | 63 |
| 64 #endif // CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_CREATOR_H_ | 64 #endif // CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| OLD | NEW |