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

Side by Side Diff: content/public/browser/page_navigator.h

Issue 11193051: To fix the cross-site post submission bug. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix FileRead Permission Created 8 years, 2 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 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 // PageNavigator defines an interface that can be used to express the user's 5 // PageNavigator defines an interface that can be used to express the user's
6 // intention to navigate to a particular URL. The implementing class should 6 // intention to navigate to a particular URL. The implementing class should
7 // perform the navigation. 7 // perform the navigation.
8 8
9 #ifndef CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ 9 #ifndef CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_
10 #define CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ 10 #define CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_
11 11
12 #include <string> 12 #include <string>
13 #include <vector>
13 14
15 #include "content/public/common/frame_navigate_params.h"
16
17 #include "base/base_export.h"
18 #include "base/memory/ref_counted.h"
14 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
15 #include "content/public/browser/global_request_id.h" 20 #include "content/public/browser/global_request_id.h"
16 #include "content/public/common/page_transition_types.h" 21 #include "content/public/common/page_transition_types.h"
17 #include "content/public/common/referrer.h" 22 #include "content/public/common/referrer.h"
18 #include "googleurl/src/gurl.h" 23 #include "googleurl/src/gurl.h"
19 #include "webkit/glue/window_open_disposition.h" 24 #include "webkit/glue/window_open_disposition.h"
20 25
26
21 namespace content { 27 namespace content {
22 28
23 class WebContents; 29 class WebContents;
30 struct WebHTTPPOSTBodyParams;
24 31
25 struct CONTENT_EXPORT OpenURLParams { 32 struct CONTENT_EXPORT OpenURLParams {
26 OpenURLParams(const GURL& url, 33 OpenURLParams(const GURL& url,
27 const Referrer& referrer, 34 const Referrer& referrer,
28 WindowOpenDisposition disposition, 35 WindowOpenDisposition disposition,
29 PageTransition transition, 36 PageTransition transition,
30 bool is_renderer_initiated); 37 bool is_renderer_initiated);
31 OpenURLParams(const GURL& url, 38 OpenURLParams(const GURL& url,
32 const Referrer& referrer, 39 const Referrer& referrer,
33 int64 source_frame_id, 40 int64 source_frame_id,
(...skipping 23 matching lines...) Expand all
57 // Whether this navigation is initiated by the renderer process. 64 // Whether this navigation is initiated by the renderer process.
58 bool is_renderer_initiated; 65 bool is_renderer_initiated;
59 66
60 // The override encoding of the URL contents to be opened. 67 // The override encoding of the URL contents to be opened.
61 std::string override_encoding; 68 std::string override_encoding;
62 69
63 // Reference to the old request id in case this is a navigation that is being 70 // Reference to the old request id in case this is a navigation that is being
64 // transferred to a new renderer. 71 // transferred to a new renderer.
65 GlobalRequestID transferred_global_request_id; 72 GlobalRequestID transferred_global_request_id;
66 73
74 // The Post data in HTTPRequest body.
75 std::vector<content::WebHTTPPOSTBodyParams> post_data;
76
67 private: 77 private:
68 OpenURLParams(); 78 OpenURLParams();
69 }; 79 };
70 80
71 class PageNavigator { 81 class PageNavigator {
72 public: 82 public:
73 virtual ~PageNavigator() {} 83 virtual ~PageNavigator() {}
74 84
75 // Opens a URL with the given disposition. The transition specifies how this 85 // Opens a URL with the given disposition. The transition specifies how this
76 // navigation should be recorded in the history system (for example, typed). 86 // navigation should be recorded in the history system (for example, typed).
77 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't 87 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't
78 // opened immediately. 88 // opened immediately.
79 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; 89 virtual WebContents* OpenURL(const OpenURLParams& params) = 0;
80 }; 90 };
81 91
82 } 92 }
83 93
84 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ 94 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698