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

Side by Side Diff: chrome/common/render_messages.h

Issue 8186: Plumb the referrer throughout the OpenURL APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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
« no previous file with comments | « chrome/browser/web_drop_target.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
6 #define CHROME_COMMON_RENDER_MESSAGES_H_ 6 #define CHROME_COMMON_RENDER_MESSAGES_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 struct ViewMsg_Navigate_Params { 34 struct ViewMsg_Navigate_Params {
35 // The page_id for this navigation, or -1 if it is a new navigation. Back, 35 // The page_id for this navigation, or -1 if it is a new navigation. Back,
36 // Forward, and Reload navigations should have a valid page_id. If the load 36 // Forward, and Reload navigations should have a valid page_id. If the load
37 // succeeds, then this page_id will be reflected in the resultant 37 // succeeds, then this page_id will be reflected in the resultant
38 // ViewHostMsg_FrameNavigate message. 38 // ViewHostMsg_FrameNavigate message.
39 int32 page_id; 39 int32 page_id;
40 40
41 // The URL to load. 41 // The URL to load.
42 GURL url; 42 GURL url;
43 43
44 // The URL to send in the "Referer" header field. Can be empty if there is
45 // no referrer.
46 GURL referrer;
47
44 // The type of transition. 48 // The type of transition.
45 PageTransition::Type transition; 49 PageTransition::Type transition;
46 50
47 // Opaque history state (received by ViewHostMsg_UpdateState). 51 // Opaque history state (received by ViewHostMsg_UpdateState).
48 std::string state; 52 std::string state;
49 53
50 // Specifies if the URL should be loaded using 'reload' semantics (i.e., 54 // Specifies if the URL should be loaded using 'reload' semantics (i.e.,
51 // bypassing any locally cached content). 55 // bypassing any locally cached content).
52 bool reload; 56 bool reload;
53 }; 57 };
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 } 746 }
743 }; 747 };
744 748
745 // Traits for ViewMsg_Navigate_Params structure to pack/unpack. 749 // Traits for ViewMsg_Navigate_Params structure to pack/unpack.
746 template <> 750 template <>
747 struct ParamTraits<ViewMsg_Navigate_Params> { 751 struct ParamTraits<ViewMsg_Navigate_Params> {
748 typedef ViewMsg_Navigate_Params param_type; 752 typedef ViewMsg_Navigate_Params param_type;
749 static void Write(Message* m, const param_type& p) { 753 static void Write(Message* m, const param_type& p) {
750 WriteParam(m, p.page_id); 754 WriteParam(m, p.page_id);
751 WriteParam(m, p.url); 755 WriteParam(m, p.url);
756 WriteParam(m, p.referrer);
752 WriteParam(m, p.transition); 757 WriteParam(m, p.transition);
753 WriteParam(m, p.state); 758 WriteParam(m, p.state);
754 WriteParam(m, p.reload); 759 WriteParam(m, p.reload);
755 } 760 }
756 static bool Read(const Message* m, void** iter, param_type* p) { 761 static bool Read(const Message* m, void** iter, param_type* p) {
757 return 762 return
758 ReadParam(m, iter, &p->page_id) && 763 ReadParam(m, iter, &p->page_id) &&
759 ReadParam(m, iter, &p->url) && 764 ReadParam(m, iter, &p->url) &&
765 ReadParam(m, iter, &p->referrer) &&
760 ReadParam(m, iter, &p->transition) && 766 ReadParam(m, iter, &p->transition) &&
761 ReadParam(m, iter, &p->state) && 767 ReadParam(m, iter, &p->state) &&
762 ReadParam(m, iter, &p->reload); 768 ReadParam(m, iter, &p->reload);
763 } 769 }
764 static void Log(const param_type& p, std::wstring* l) { 770 static void Log(const param_type& p, std::wstring* l) {
765 l->append(L"("); 771 l->append(L"(");
766 LogParam(p.page_id, l); 772 LogParam(p.page_id, l);
767 l->append(L", "); 773 l->append(L", ");
768 LogParam(p.url, l); 774 LogParam(p.url, l);
769 l->append(L", "); 775 l->append(L", ");
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 ReadParam(m, iter, &p->file_contents); 1647 ReadParam(m, iter, &p->file_contents);
1642 } 1648 }
1643 static void Log(const param_type& p, std::wstring* l) { 1649 static void Log(const param_type& p, std::wstring* l) {
1644 l->append(L"<WebDropData>"); 1650 l->append(L"<WebDropData>");
1645 } 1651 }
1646 }; 1652 };
1647 1653
1648 } // namespace IPC 1654 } // namespace IPC
1649 1655
1650 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 1656 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW
« no previous file with comments | « chrome/browser/web_drop_target.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698