Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 226503002: Move modal dialogs from WebViewClient to WebFrameClient, part 1/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last nits Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 18e9ceab00afb145dbe61cffbc2599caa8b42dca..5187628ed1d8817bc25fc40b5c52c80067794211 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -313,6 +313,16 @@ class CONTENT_EXPORT WebContentsImpl
virtual void WorkerCrashed(RenderFrameHost* render_frame_host) OVERRIDE;
virtual void ShowContextMenu(RenderFrameHost* render_frame_host,
const ContextMenuParams& params) OVERRIDE;
+ virtual void RunJavaScriptMessage(RenderFrameHost* rfh,
+ const base::string16& message,
+ const base::string16& default_prompt,
+ const GURL& frame_url,
+ JavaScriptMessageType type,
+ IPC::Message* reply_msg) OVERRIDE;
+ virtual void RunBeforeUnloadConfirm(RenderFrameHost* rfh,
+ const base::string16& message,
+ bool is_reload,
+ IPC::Message* reply_msg) OVERRIDE;
virtual WebContents* GetAsWebContents() OVERRIDE;
// RenderViewHostDelegate ----------------------------------------------------
@@ -354,17 +364,6 @@ class CONTENT_EXPORT WebContentsImpl
virtual void RouteMessageEvent(
RenderViewHost* rvh,
const ViewMsg_PostMessage_Params& params) OVERRIDE;
- virtual void RunJavaScriptMessage(RenderViewHost* rvh,
- const base::string16& message,
- const base::string16& default_prompt,
- const GURL& frame_url,
- JavaScriptMessageType type,
- IPC::Message* reply_msg,
- bool* did_suppress_message) OVERRIDE;
- virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh,
- const base::string16& message,
- bool is_reload,
- IPC::Message* reply_msg) OVERRIDE;
virtual bool AddMessageToConsole(int32 level,
const base::string16& message,
int32 line_no,
@@ -645,9 +644,10 @@ class CONTENT_EXPORT WebContentsImpl
// watching |web_contents|. No-op if there is no such observer.
void RemoveDestructionObserver(WebContentsImpl* web_contents);
- // Callback function when showing JS dialogs.
- void OnDialogClosed(RenderViewHost* rvh,
+ // Callback function when showing JavaScript dialogs.
+ void OnDialogClosed(RenderFrameHost* rfh,
IPC::Message* reply_msg,
+ bool dialog_was_suppressed,
bool success,
const base::string16& user_input);
@@ -1051,6 +1051,9 @@ class CONTENT_EXPORT WebContentsImpl
// different process from its parent page.
bool is_subframe_;
+ // Whether the last JavaScript dialog shown was suppressed. Used for testing.
+ bool last_dialog_suppressed_;
+
DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
};
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698