Chromium Code Reviews| Index: content/browser/browser_plugin/browser_plugin_guest.h |
| diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h |
| index f30e14830de80503db3cf200b7df5e0eef24e613..87d22134f0ebcdb4451ac5f8f4691749f62b2293 100644 |
| --- a/content/browser/browser_plugin/browser_plugin_guest.h |
| +++ b/content/browser/browser_plugin/browser_plugin_guest.h |
| @@ -33,6 +33,7 @@ |
| #include "content/common/edit_command.h" |
| #include "content/port/common/input_event_ack_state.h" |
| #include "content/public/browser/browser_plugin_guest_delegate.h" |
| +#include "content/public/browser/javascript_dialog_manager.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| #include "content/public/browser/render_view_host_observer.h" |
| @@ -86,6 +87,7 @@ class CONTENT_EXPORT BrowserPluginGuest |
| : public NotificationObserver, |
| public WebContentsDelegate, |
| public WebContentsObserver, |
| + public JavaScriptDialogManager, |
|
lazyboy
2013/07/19 21:43:16
sort?
Fady Samuel
2013/07/23 15:41:10
Done.
|
| public base::SupportsWeakPtr<BrowserPluginGuest> { |
| public: |
| typedef base::Callback<void(bool)> GeolocationCallback; |
| @@ -161,7 +163,6 @@ class CONTENT_EXPORT BrowserPluginGuest |
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| // WebContentsDelegate implementation. |
| - |
| virtual bool AddMessageToConsole(WebContents* source, |
| int32 level, |
| const string16& message, |
| @@ -181,6 +182,7 @@ class CONTENT_EXPORT BrowserPluginGuest |
| const std::string& request_method, |
| const base::Callback<void(bool)>& callback) OVERRIDE; |
| virtual void CloseContents(WebContents* source) OVERRIDE; |
| + virtual JavaScriptDialogManager* GetJavaScriptDialogManager() OVERRIDE; |
| virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; |
| virtual void HandleKeyboardEvent( |
| WebContents* source, |
| @@ -202,6 +204,26 @@ class CONTENT_EXPORT BrowserPluginGuest |
| const MediaStreamRequest& request, |
| const MediaResponseCallback& callback) OVERRIDE; |
| + // JavaScriptDialogManager implementation. |
| + virtual void RunJavaScriptDialog( |
| + WebContents* web_contents, |
| + const GURL& origin_url, |
| + const std::string& accept_lang, |
| + JavaScriptMessageType javascript_message_type, |
| + const string16& message_text, |
| + const string16& default_prompt_text, |
| + const DialogClosedCallback& callback, |
| + bool* did_suppress_message) OVERRIDE; |
| + virtual void RunBeforeUnloadDialog( |
| + WebContents* web_contents, |
| + const string16& message_text, |
| + bool is_reload, |
| + const DialogClosedCallback& callback) OVERRIDE; |
| + virtual bool HandleJavaScriptDialog(WebContents* web_contents, |
| + bool accept, |
| + const string16* prompt_override) OVERRIDE; |
| + virtual void ResetJavaScriptState(WebContents* web_contents) OVERRIDE; |
| + |
| // Exposes the protected web_contents() from WebContentsObserver. |
| WebContentsImpl* GetWebContents(); |
| @@ -264,6 +286,7 @@ class CONTENT_EXPORT BrowserPluginGuest |
| class DownloadRequest; |
| class GeolocationRequest; |
| + class JavaScriptDialogRequest; |
| // MediaRequest because of naming conflicts with MediaStreamRequest. |
| class MediaRequest; |
| class NewWindowRequest; |
| @@ -304,9 +327,9 @@ class CONTENT_EXPORT BrowserPluginGuest |
| // Allows or denies a permission request access, after the embedder has had a |
| // chance to decide. |
| void OnRespondPermission(int instance_id, |
| - BrowserPluginPermissionType permission_type, |
| int request_id, |
| - bool should_allow); |
| + bool should_allow, |
| + const std::string& user_input); |
| // Handles drag events from the embedder. |
| // When dragging, the drag events go to the embedder first, and if the drag |
| // happens on the browser plugin, then the plugin sends a corresponding |