OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // IPC messages for interacting with frames. | 5 // IPC messages for interacting with frames. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "content/common/content_param_traits.h" | 9 #include "content/common/content_param_traits.h" |
10 #include "content/common/frame_message_enums.h" | 10 #include "content/common/frame_message_enums.h" |
11 #include "content/common/frame_param.h" | 11 #include "content/common/frame_param.h" |
12 #include "content/common/navigation_gesture.h" | 12 #include "content/common/navigation_gesture.h" |
13 #include "content/public/common/common_param_traits.h" | 13 #include "content/public/common/common_param_traits.h" |
14 #include "content/public/common/context_menu_params.h" | 14 #include "content/public/common/context_menu_params.h" |
15 #include "content/public/common/frame_navigate_params.h" | 15 #include "content/public/common/frame_navigate_params.h" |
16 #include "content/public/common/javascript_message_type.h" | |
16 #include "content/public/common/page_state.h" | 17 #include "content/public/common/page_state.h" |
17 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
18 #include "url/gurl.h" | 19 #include "url/gurl.h" |
19 | 20 |
20 #undef IPC_MESSAGE_EXPORT | 21 #undef IPC_MESSAGE_EXPORT |
21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 22 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
22 | 23 |
23 #define IPC_MESSAGE_START FrameMsgStart | 24 #define IPC_MESSAGE_START FrameMsgStart |
24 | 25 |
26 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType, | |
27 content::JAVASCRIPT_MESSAGE_TYPE_ALERT, | |
28 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) | |
29 | |
nasko
2014/04/08 14:05:04
nit: no empty line needed
Avi (use Gerrit)
2014/04/08 15:09:22
Done.
| |
25 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, | 30 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, |
26 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) | 31 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) |
27 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, | 32 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, |
28 blink::WebContextMenuData::MediaTypeLast) | 33 blink::WebContextMenuData::MediaTypeLast) |
29 | 34 |
30 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) | 35 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) |
31 | 36 |
32 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams) | 37 IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams) |
33 IPC_STRUCT_TRAITS_MEMBER(media_type) | 38 IPC_STRUCT_TRAITS_MEMBER(media_type) |
34 IPC_STRUCT_TRAITS_MEMBER(x) | 39 IPC_STRUCT_TRAITS_MEMBER(x) |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
513 float /* scale_factor */) | 518 float /* scale_factor */) |
514 | 519 |
515 // Response for FrameMsg_JavaScriptExecuteRequest, sent when a reply was | 520 // Response for FrameMsg_JavaScriptExecuteRequest, sent when a reply was |
516 // requested. The ID is the parameter supplied to | 521 // requested. The ID is the parameter supplied to |
517 // FrameMsg_JavaScriptExecuteRequest. The result has the value returned by the | 522 // FrameMsg_JavaScriptExecuteRequest. The result has the value returned by the |
518 // script as its only element, one of Null, Boolean, Integer, Real, Date, or | 523 // script as its only element, one of Null, Boolean, Integer, Real, Date, or |
519 // String. | 524 // String. |
520 IPC_MESSAGE_ROUTED2(FrameHostMsg_JavaScriptExecuteResponse, | 525 IPC_MESSAGE_ROUTED2(FrameHostMsg_JavaScriptExecuteResponse, |
521 int /* id */, | 526 int /* id */, |
522 base::ListValue /* result */) | 527 base::ListValue /* result */) |
528 | |
529 // A request to run a JavaScript dialog. | |
530 IPC_SYNC_MESSAGE_ROUTED4_2(FrameHostMsg_RunJavaScriptMessage, | |
531 base::string16 /* in - alert message */, | |
532 base::string16 /* in - default prompt */, | |
533 GURL /* in - originating page URL */, | |
534 content::JavaScriptMessageType /* in - type */, | |
535 bool /* out - success */, | |
536 base::string16 /* out - user_input field */) | |
537 | |
538 // Displays a dialog to confirm that the user wants to navigate away from the | |
539 // page. Replies true if yes, and false otherwise. The reply string is ignored, | |
540 // but is included so that we can use OnJavaScriptMessageBoxClosed. | |
541 IPC_SYNC_MESSAGE_ROUTED3_2(FrameHostMsg_RunBeforeUnloadConfirm, | |
542 GURL, /* in - originating frame URL */ | |
543 base::string16 /* in - alert message */, | |
544 bool /* in - is a reload */, | |
545 bool /* out - success */, | |
546 base::string16 /* out - This is ignored.*/) | |
OLD | NEW |