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

Unified Diff: content/common/frame_messages.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: works 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/common/frame_messages.h
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index fe603b0d672bcd9e3f4ac7387e81dac872899320..4ba9e7be74c17ec8d1ed59759654ac2116369b14 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -13,6 +13,7 @@
#include "content/public/common/common_param_traits.h"
#include "content/public/common/context_menu_params.h"
#include "content/public/common/frame_navigate_params.h"
+#include "content/public/common/javascript_message_type.h"
#include "content/public/common/page_state.h"
#include "ipc/ipc_message_macros.h"
#include "url/gurl.h"
@@ -22,6 +23,10 @@
#define IPC_MESSAGE_START FrameMsgStart
+IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType,
+ content::JAVASCRIPT_MESSAGE_TYPE_ALERT,
+ content::JAVASCRIPT_MESSAGE_TYPE_PROMPT)
+
nasko 2014/04/08 14:05:04 nit: no empty line needed
Avi (use Gerrit) 2014/04/08 15:09:22 Done.
IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value,
FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType,
@@ -520,3 +525,22 @@ IPC_MESSAGE_ROUTED2(FrameHostMsg_InitializeChildFrame,
IPC_MESSAGE_ROUTED2(FrameHostMsg_JavaScriptExecuteResponse,
int /* id */,
base::ListValue /* result */)
+
+// A request to run a JavaScript dialog.
+IPC_SYNC_MESSAGE_ROUTED4_2(FrameHostMsg_RunJavaScriptMessage,
+ base::string16 /* in - alert message */,
+ base::string16 /* in - default prompt */,
+ GURL /* in - originating page URL */,
+ content::JavaScriptMessageType /* in - type */,
+ bool /* out - success */,
+ base::string16 /* out - user_input field */)
+
+// Displays a dialog to confirm that the user wants to navigate away from the
+// page. Replies true if yes, and false otherwise. The reply string is ignored,
+// but is included so that we can use OnJavaScriptMessageBoxClosed.
+IPC_SYNC_MESSAGE_ROUTED3_2(FrameHostMsg_RunBeforeUnloadConfirm,
+ GURL, /* in - originating frame URL */
+ base::string16 /* in - alert message */,
+ bool /* in - is a reload */,
+ bool /* out - success */,
+ base::string16 /* out - This is ignored.*/)

Powered by Google App Engine
This is Rietveld 408576698