| 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 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "content/public/common/frame_navigate_params.h" |
| 13 |
| 12 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 13 #include "base/string16.h" | 15 #include "base/string16.h" |
| 14 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/global_request_id.h" | 17 #include "content/public/browser/global_request_id.h" |
| 16 #include "content/public/common/page_transition_types.h" | 18 #include "content/public/common/page_transition_types.h" |
| 17 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
| 18 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
| 19 | 21 |
| 20 namespace base { | 22 namespace base { |
| 21 | 23 |
| 22 class RefCountedMemory; | 24 class RefCountedMemory; |
| 23 | 25 |
| 24 } // namespace base | 26 } // namespace base |
| 25 | 27 |
| 26 namespace content { | 28 namespace content { |
| 27 | 29 |
| 28 class BrowserContext; | 30 class BrowserContext; |
| 29 class NavigationEntry; | 31 class NavigationEntry; |
| 30 class SessionStorageNamespace; | 32 class SessionStorageNamespace; |
| 31 class WebContents; | 33 class WebContents; |
| 34 struct WebHTTPPOSTBodyParams; |
| 32 | 35 |
| 33 // Used to store the mapping of a StoragePartition id to | 36 // Used to store the mapping of a StoragePartition id to |
| 34 // SessionStorageNamespace. | 37 // SessionStorageNamespace. |
| 35 typedef std::map<std::string, scoped_refptr<SessionStorageNamespace> > | 38 typedef std::map<std::string, scoped_refptr<SessionStorageNamespace> > |
| 36 SessionStorageNamespaceMap; | 39 SessionStorageNamespaceMap; |
| 37 | 40 |
| 38 // A NavigationController maintains the back-forward list for a WebContents and | 41 // A NavigationController maintains the back-forward list for a WebContents and |
| 39 // manages all navigation within that list. | 42 // manages all navigation within that list. |
| 40 // | 43 // |
| 41 // Each NavigationController belongs to one WebContents; each WebContents has | 44 // Each NavigationController belongs to one WebContents; each WebContents has |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 144 |
| 142 // Used in LOAD_TYPE_DATA loads only. URL displayed to the user for | 145 // Used in LOAD_TYPE_DATA loads only. URL displayed to the user for |
| 143 // data loads. | 146 // data loads. |
| 144 GURL virtual_url_for_data_url; | 147 GURL virtual_url_for_data_url; |
| 145 | 148 |
| 146 // Used in LOAD_TYPE_BROWSER_INITIATED_HTTP_POST loads only. Carries the | 149 // Used in LOAD_TYPE_BROWSER_INITIATED_HTTP_POST loads only. Carries the |
| 147 // post data of the load. Ownership is transferred to NavigationController | 150 // post data of the load. Ownership is transferred to NavigationController |
| 148 // after LoadURLWithParams call. | 151 // after LoadURLWithParams call. |
| 149 scoped_refptr<base::RefCountedMemory> browser_initiated_post_data; | 152 scoped_refptr<base::RefCountedMemory> browser_initiated_post_data; |
| 150 | 153 |
| 154 // post data |
| 155 std::vector<content::WebHTTPPOSTBodyParams> post_data; |
| 156 |
| 151 // True if this URL should be able to access local resources. | 157 // True if this URL should be able to access local resources. |
| 152 bool can_load_local_resources; | 158 bool can_load_local_resources; |
| 153 | 159 |
| 154 explicit LoadURLParams(const GURL& url); | 160 explicit LoadURLParams(const GURL& url); |
| 155 ~LoadURLParams(); | 161 ~LoadURLParams(); |
| 156 | 162 |
| 157 // Allows copying of LoadURLParams struct. | 163 // Allows copying of LoadURLParams struct. |
| 158 LoadURLParams(const LoadURLParams& other); | 164 LoadURLParams(const LoadURLParams& other); |
| 159 LoadURLParams& operator=(const LoadURLParams& other); | 165 LoadURLParams& operator=(const LoadURLParams& other); |
| 160 }; | 166 }; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 virtual void CopyStateFromAndPrune(NavigationController* source) = 0; | 377 virtual void CopyStateFromAndPrune(NavigationController* source) = 0; |
| 372 | 378 |
| 373 // Removes all the entries except the active entry. If there is a new pending | 379 // Removes all the entries except the active entry. If there is a new pending |
| 374 // navigation it is preserved. | 380 // navigation it is preserved. |
| 375 virtual void PruneAllButActive() = 0; | 381 virtual void PruneAllButActive() = 0; |
| 376 }; | 382 }; |
| 377 | 383 |
| 378 } // namespace content | 384 } // namespace content |
| 379 | 385 |
| 380 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 386 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| OLD | NEW |