Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_impl.h |
| diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h |
| index bccc0e2715113fb87d1024efaa1b9e795581abac..ad58c542fdf255ea1700dd98787427bc7674690a 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.h |
| +++ b/content/browser/frame_host/render_frame_host_impl.h |
| @@ -14,6 +14,7 @@ |
| #include "base/time/time.h" |
| #include "content/common/content_export.h" |
| #include "content/public/browser/render_frame_host.h" |
| +#include "content/public/common/javascript_message_type.h" |
| #include "content/public/common/page_transition_types.h" |
| class GURL; |
| @@ -168,6 +169,12 @@ class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { |
| // before and after the selection or caret. |
| void ExtendSelectionAndDelete(size_t before, size_t after); |
| + // Notifies the RenderView that the JavaScript message that was shown was |
|
nasko
2014/04/07 15:45:51
nit: RenderFrame
Avi (use Gerrit)
2014/04/07 18:03:46
Done.
|
| + // closed by the user. |
| + void JavaScriptDialogClosed(IPC::Message* reply_msg, |
| + bool success, |
| + const base::string16& user_input); |
| + |
| protected: |
| friend class RenderFrameHostFactory; |
| @@ -213,12 +220,25 @@ class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { |
| void OnSwapOutACK(); |
| void OnContextMenu(const ContextMenuParams& params); |
| void OnJavaScriptExecuteResponse(int id, const base::ListValue& result); |
| + void OnRunJavaScriptMessage(const base::string16& message, |
| + const base::string16& default_prompt, |
| + const GURL& frame_url, |
| + JavaScriptMessageType type, |
| + IPC::Message* reply_msg); |
| + void OnRunBeforeUnloadConfirm(const GURL& frame_url, |
| + const base::string16& message, |
| + bool is_reload, |
| + IPC::Message* reply_msg); |
| // Returns whether the given URL is allowed to commit in the current process. |
| // This is a more conservative check than RenderProcessHost::FilterURL, since |
| // it will be used to kill processes that commit unauthorized URLs. |
| bool CanCommitURL(const GURL& url); |
| + // Returns a pointer to the top-level boolean holding the value of whether |
| + // JavaScript messages are suppressed for the page. |
| + bool* AreJavaScriptMessagesSuppressed(); |
| + |
| // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
| // refcount that calls Shutdown when it reaches zero. This allows each |
| // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
| @@ -259,6 +279,10 @@ class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { |
| // When the last BeforeUnload message was sent. |
| base::TimeTicks send_before_unload_start_time_; |
| + // Set if JavaScript messages are suppressed for this page. This is only used |
| + // in the top-level frame. |
| + bool are_javascript_messages_suppressed_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| }; |