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

Side by Side Diff: content/common/view_messages.h

Issue 11193051: To fix the cross-site post submission bug. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reuse ResourceRequestBody Struct Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 page rendering. 5 // IPC messages for page rendering.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 27 matching lines...) Expand all
38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
41 #include "ui/base/dialogs/selected_file_info.h" 41 #include "ui/base/dialogs/selected_file_info.h"
42 #include "ui/base/ime/text_input_type.h" 42 #include "ui/base/ime/text_input_type.h"
43 #include "ui/base/range/range.h" 43 #include "ui/base/range/range.h"
44 #include "ui/gfx/point.h" 44 #include "ui/gfx/point.h"
45 #include "ui/gfx/rect.h" 45 #include "ui/gfx/rect.h"
46 #include "ui/gfx/rect_f.h" 46 #include "ui/gfx/rect_f.h"
47 #include "ui/gfx/vector2d.h" 47 #include "ui/gfx/vector2d.h"
48 #include "webkit/glue/resource_request_body.h"
48 #include "webkit/glue/webcookie.h" 49 #include "webkit/glue/webcookie.h"
49 #include "webkit/glue/webmenuitem.h" 50 #include "webkit/glue/webmenuitem.h"
50 #include "webkit/glue/webpreferences.h" 51 #include "webkit/glue/webpreferences.h"
51 #include "webkit/plugins/npapi/webplugin.h" 52 #include "webkit/plugins/npapi/webplugin.h"
52 53
53 #if defined(OS_MACOSX) 54 #if defined(OS_MACOSX)
54 #include "content/common/mac/font_descriptor.h" 55 #include "content/common/mac/font_descriptor.h"
55 #endif 56 #endif
56 57
57 #undef IPC_MESSAGE_EXPORT 58 #undef IPC_MESSAGE_EXPORT
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 // The identifier of the RenderProcessHost for the new view attempting to 662 // The identifier of the RenderProcessHost for the new view attempting to
662 // replace the closing one above. 663 // replace the closing one above.
663 IPC_STRUCT_MEMBER(int, new_render_process_host_id) 664 IPC_STRUCT_MEMBER(int, new_render_process_host_id)
664 665
665 // The identifier of the *request* the new view made that is causing the 666 // The identifier of the *request* the new view made that is causing the
666 // cross-site transition. This is *not* a route_id, but the request that we 667 // cross-site transition. This is *not* a route_id, but the request that we
667 // will resume once the ACK from the closing view has been received. 668 // will resume once the ACK from the closing view has been received.
668 IPC_STRUCT_MEMBER(int, new_request_id) 669 IPC_STRUCT_MEMBER(int, new_request_id)
669 IPC_STRUCT_END() 670 IPC_STRUCT_END()
670 671
672 // Parameters for a resource request.
673 IPC_STRUCT_TRAITS_BEGIN(content::ViewMsg_Request)
674 // The request method: GET, POST, etc.
675 IPC_STRUCT_TRAITS_MEMBER(method)
676
677 // The requested URL.
678 IPC_STRUCT_TRAITS_MEMBER(url)
679
680 // Additional HTTP request headers.
681 IPC_STRUCT_TRAITS_MEMBER(headers)
682
683 // Optional resource request body (may be null).
684 IPC_STRUCT_TRAITS_MEMBER(request_body)
685 IPC_STRUCT_TRAITS_END()
686
671 IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params) 687 IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params)
672 // The page_id for this navigation, or -1 if it is a new navigation. Back, 688 // The page_id for this navigation, or -1 if it is a new navigation. Back,
673 // Forward, and Reload navigations should have a valid page_id. If the load 689 // Forward, and Reload navigations should have a valid page_id. If the load
674 // succeeds, then this page_id will be reflected in the resultant 690 // succeeds, then this page_id will be reflected in the resultant
675 // ViewHostMsg_FrameNavigate message. 691 // ViewHostMsg_FrameNavigate message.
676 IPC_STRUCT_MEMBER(int32, page_id) 692 IPC_STRUCT_MEMBER(int32, page_id)
677 693
678 // If page_id is -1, then pending_history_list_offset will also be -1. 694 // If page_id is -1, then pending_history_list_offset will also be -1.
679 // Otherwise, it contains the offset into the history list corresponding to 695 // Otherwise, it contains the offset into the history list corresponding to
680 // the current navigation. 696 // the current navigation.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 IPC_STRUCT_MEMBER(bool, allow_download) 742 IPC_STRUCT_MEMBER(bool, allow_download)
727 743
728 // Whether or not the user agent override string should be used. 744 // Whether or not the user agent override string should be used.
729 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent) 745 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent)
730 746
731 // True if this was a post request. 747 // True if this was a post request.
732 IPC_STRUCT_MEMBER(bool, is_post) 748 IPC_STRUCT_MEMBER(bool, is_post)
733 749
734 // If is_post is true, holds the post_data information from browser. Empty 750 // If is_post is true, holds the post_data information from browser. Empty
735 // otherwise. 751 // otherwise.
736 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data) 752 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data)
michaeln 2012/11/02 00:08:23 I think you're adding a new more expressive way to
737 753
738 // Whether or not this url should be allowed to access local file:// 754 // Whether or not this url should be allowed to access local file://
739 // resources. 755 // resources.
740 IPC_STRUCT_MEMBER(bool, can_load_local_resources) 756 IPC_STRUCT_MEMBER(bool, can_load_local_resources)
757
758 IPC_STRUCT_MEMBER(content::ViewMsg_Request, request)
741 IPC_STRUCT_END() 759 IPC_STRUCT_END()
742 760
743 IPC_STRUCT_BEGIN(ViewMsg_New_Params) 761 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
744 // The parent window's id. 762 // The parent window's id.
745 IPC_STRUCT_MEMBER(gfx::NativeViewId, parent_window) 763 IPC_STRUCT_MEMBER(gfx::NativeViewId, parent_window)
746 764
747 // Renderer-wide preferences. 765 // Renderer-wide preferences.
748 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences) 766 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
749 767
750 // Preferences for this view. 768 // Preferences for this view.
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 bool /* out - success */, 1903 bool /* out - success */,
1886 string16 /* out - user_input field */) 1904 string16 /* out - user_input field */)
1887 1905
1888 // Requests that the given URL be opened in the specified manner. 1906 // Requests that the given URL be opened in the specified manner.
1889 IPC_MESSAGE_ROUTED4(ViewHostMsg_OpenURL, 1907 IPC_MESSAGE_ROUTED4(ViewHostMsg_OpenURL,
1890 GURL /* url */, 1908 GURL /* url */,
1891 content::Referrer /* referrer */, 1909 content::Referrer /* referrer */,
1892 WindowOpenDisposition /* disposition */, 1910 WindowOpenDisposition /* disposition */,
1893 int64 /* frame id */) 1911 int64 /* frame id */)
1894 1912
1913 // Requests that the given URL be opened in the specified manner.
1914 IPC_MESSAGE_ROUTED5(ViewHostMsg_OpenPostURL,
1915 GURL /* url */,
1916 content::Referrer /* referrer */,
1917 WindowOpenDisposition /* disposition */,
1918 int64 /* frame id */,
1919 content::ViewMsg_Request /* Request */)
michaeln 2012/11/02 00:08:23 the request param also contains a url data member,
irobert 2012/11/02 17:22:55 Done.
1920
1895 // Notifies that the preferred size of the content changed. 1921 // Notifies that the preferred size of the content changed.
1896 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange, 1922 IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
1897 gfx::Size /* pref_size */) 1923 gfx::Size /* pref_size */)
1898 1924
1899 // Notifies that the scrollbars-visible state of the content changed. 1925 // Notifies that the scrollbars-visible state of the content changed.
1900 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, 1926 IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
1901 bool /* has_horizontal_scrollbar */, 1927 bool /* has_horizontal_scrollbar */,
1902 bool /* has_vertical_scrollbar */) 1928 bool /* has_vertical_scrollbar */)
1903 1929
1904 // Notifies that the pinned-to-side state of the content changed. 1930 // Notifies that the pinned-to-side state of the content changed.
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent, 2420 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent,
2395 GURL /* content_url */) 2421 GURL /* content_url */)
2396 #endif 2422 #endif
2397 2423
2398 // Notifies that multiple touch targets may have been pressed, and to show 2424 // Notifies that multiple touch targets may have been pressed, and to show
2399 // the disambiguation popup. 2425 // the disambiguation popup.
2400 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup, 2426 IPC_MESSAGE_ROUTED3(ViewHostMsg_ShowDisambiguationPopup,
2401 gfx::Rect, /* Border of touched targets */ 2427 gfx::Rect, /* Border of touched targets */
2402 gfx::Size, /* Size of zoomed image */ 2428 gfx::Size, /* Size of zoomed image */
2403 TransportDIB::Id /* DIB of zoomed image */) 2429 TransportDIB::Id /* DIB of zoomed image */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698