Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 13 |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/global_request_id.h" | 15 #include "content/public/browser/global_request_id.h" |
| 16 #include "content/public/common/frame_navigate_params.h" | |
| 16 #include "content/public/common/page_transition_types.h" | 17 #include "content/public/common/page_transition_types.h" |
| 17 #include "content/public/common/referrer.h" | 18 #include "content/public/common/referrer.h" |
| 18 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
| 19 #include "webkit/glue/window_open_disposition.h" | 20 #include "webkit/glue/window_open_disposition.h" |
| 20 | 21 |
| 21 namespace content { | 22 namespace content { |
| 22 | 23 |
| 23 class WebContents; | 24 class WebContents; |
| 25 struct ViewMsg_Request; | |
| 24 | 26 |
| 25 struct CONTENT_EXPORT OpenURLParams { | 27 struct CONTENT_EXPORT OpenURLParams { |
| 26 OpenURLParams(const GURL& url, | 28 OpenURLParams(const GURL& url, |
| 27 const Referrer& referrer, | 29 const Referrer& referrer, |
| 28 WindowOpenDisposition disposition, | 30 WindowOpenDisposition disposition, |
| 29 PageTransition transition, | 31 PageTransition transition, |
| 30 bool is_renderer_initiated); | 32 bool is_renderer_initiated); |
| 31 OpenURLParams(const GURL& url, | 33 OpenURLParams(const GURL& url, |
| 32 const Referrer& referrer, | 34 const Referrer& referrer, |
| 33 int64 source_frame_id, | 35 int64 source_frame_id, |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 57 // Whether this navigation is initiated by the renderer process. | 59 // Whether this navigation is initiated by the renderer process. |
| 58 bool is_renderer_initiated; | 60 bool is_renderer_initiated; |
| 59 | 61 |
| 60 // The override encoding of the URL contents to be opened. | 62 // The override encoding of the URL contents to be opened. |
| 61 std::string override_encoding; | 63 std::string override_encoding; |
| 62 | 64 |
| 63 // Reference to the old request id in case this is a navigation that is being | 65 // Reference to the old request id in case this is a navigation that is being |
| 64 // transferred to a new renderer. | 66 // transferred to a new renderer. |
| 65 GlobalRequestID transferred_global_request_id; | 67 GlobalRequestID transferred_global_request_id; |
| 66 | 68 |
| 69 // The Post data in HTTPRequest body. | |
| 70 ViewMsg_Request request; | |
|
michaeln
2012/11/02 00:08:23
There's some overlap between member of tha OpenURL
irobert
2012/11/02 17:22:55
Besides the url member, the other member in the Vi
| |
| 71 | |
| 67 private: | 72 private: |
| 68 OpenURLParams(); | 73 OpenURLParams(); |
| 69 }; | 74 }; |
| 70 | 75 |
| 71 class PageNavigator { | 76 class PageNavigator { |
| 72 public: | 77 public: |
| 73 virtual ~PageNavigator() {} | 78 virtual ~PageNavigator() {} |
| 74 | 79 |
| 75 // Opens a URL with the given disposition. The transition specifies how this | 80 // Opens a URL with the given disposition. The transition specifies how this |
| 76 // navigation should be recorded in the history system (for example, typed). | 81 // 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 | 82 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't |
| 78 // opened immediately. | 83 // opened immediately. |
| 79 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; | 84 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; |
| 80 }; | 85 }; |
| 81 | 86 |
| 82 } | 87 } |
| 83 | 88 |
| 84 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ | 89 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ |
| OLD | NEW |