| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 19 #include "content/public/browser/global_request_id.h" | 19 #include "content/public/browser/global_request_id.h" |
| 20 #include "content/public/browser/session_storage_namespace.h" | 20 #include "content/public/browser/session_storage_namespace.h" |
| 21 #include "content/public/browser/site_instance.h" | 21 #include "content/public/browser/site_instance.h" |
| 22 #include "content/public/common/referrer.h" | 22 #include "content/public/common/referrer.h" |
| 23 #include "content/public/common/resource_request_body.h" |
| 23 #include "ui/base/page_transition_types.h" | 24 #include "ui/base/page_transition_types.h" |
| 24 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 25 | 26 |
| 26 namespace base { | 27 namespace base { |
| 27 | 28 |
| 28 class RefCountedMemory; | |
| 29 class RefCountedString; | 29 class RefCountedString; |
| 30 | 30 |
| 31 } // namespace base | 31 } // namespace base |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 | 34 |
| 35 class BrowserContext; | 35 class BrowserContext; |
| 36 class NavigationEntry; | 36 class NavigationEntry; |
| 37 class WebContents; | 37 class WebContents; |
| 38 | 38 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 58 // Load type used in LoadURLParams. | 58 // Load type used in LoadURLParams. |
| 59 // | 59 // |
| 60 // A Java counterpart will be generated for this enum. | 60 // A Java counterpart will be generated for this enum. |
| 61 // GENERATED_JAVA_ENUM_PACKAGE: ( | 61 // GENERATED_JAVA_ENUM_PACKAGE: ( |
| 62 // org.chromium.content_public.browser.navigation_controller) | 62 // org.chromium.content_public.browser.navigation_controller) |
| 63 // GENERATED_JAVA_PREFIX_TO_STRIP: LOAD_TYPE_ | 63 // GENERATED_JAVA_PREFIX_TO_STRIP: LOAD_TYPE_ |
| 64 enum LoadURLType { | 64 enum LoadURLType { |
| 65 // For loads that do not fall into any types below. | 65 // For loads that do not fall into any types below. |
| 66 LOAD_TYPE_DEFAULT, | 66 LOAD_TYPE_DEFAULT, |
| 67 | 67 |
| 68 // An http post load request initiated from browser side. | 68 // An http post load request. The post data is passed in |post_data|. |
| 69 // The post data is passed in |browser_initiated_post_data|. | 69 LOAD_TYPE_HTTP_POST, |
| 70 LOAD_TYPE_BROWSER_INITIATED_HTTP_POST, | |
| 71 | 70 |
| 72 // Loads a 'data:' scheme URL with specified base URL and a history entry | 71 // Loads a 'data:' scheme URL with specified base URL and a history entry |
| 73 // URL. This is only safe to be used for browser-initiated data: URL | 72 // URL. This is only safe to be used for browser-initiated data: URL |
| 74 // navigations, since it shows arbitrary content as if it comes from | 73 // navigations, since it shows arbitrary content as if it comes from |
| 75 // |virtual_url_for_data_url|. | 74 // |virtual_url_for_data_url|. |
| 76 LOAD_TYPE_DATA | 75 LOAD_TYPE_DATA |
| 77 | 76 |
| 78 // Adding new LoadURLType? Also update LoadUrlParams.java static constants. | 77 // Adding new LoadURLType? Also update LoadUrlParams.java static constants. |
| 79 }; | 78 }; |
| 80 | 79 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 GURL virtual_url_for_data_url; | 170 GURL virtual_url_for_data_url; |
| 172 | 171 |
| 173 #if defined(OS_ANDROID) | 172 #if defined(OS_ANDROID) |
| 174 // Used in LOAD_TYPE_DATA loads only. The real data URI is represented | 173 // Used in LOAD_TYPE_DATA loads only. The real data URI is represented |
| 175 // as a string to circumvent the restriction on GURL size. This is only | 174 // as a string to circumvent the restriction on GURL size. This is only |
| 176 // needed to pass URLs that exceed the IPC limit (kMaxURLChars). Short | 175 // needed to pass URLs that exceed the IPC limit (kMaxURLChars). Short |
| 177 // data: URLs can be passed in the |url| field. | 176 // data: URLs can be passed in the |url| field. |
| 178 scoped_refptr<base::RefCountedString> data_url_as_string; | 177 scoped_refptr<base::RefCountedString> data_url_as_string; |
| 179 #endif | 178 #endif |
| 180 | 179 |
| 181 // Used in LOAD_TYPE_BROWSER_INITIATED_HTTP_POST loads only. Carries the | 180 // Used in LOAD_TYPE_HTTP_POST loads only. Carries the post data of the |
| 182 // post data of the load. Ownership is transferred to NavigationController | 181 // load. Ownership is transferred to NavigationController after |
| 183 // after LoadURLWithParams call. | 182 // LoadURLWithParams call. |
| 184 scoped_refptr<base::RefCountedMemory> browser_initiated_post_data; | 183 scoped_refptr<ResourceRequestBody> post_data; |
| 185 | 184 |
| 186 // True if this URL should be able to access local resources. | 185 // True if this URL should be able to access local resources. |
| 187 bool can_load_local_resources; | 186 bool can_load_local_resources; |
| 188 | 187 |
| 189 // Indicates whether this navigation should replace the current | 188 // Indicates whether this navigation should replace the current |
| 190 // navigation entry. | 189 // navigation entry. |
| 191 bool should_replace_current_entry; | 190 bool should_replace_current_entry; |
| 192 | 191 |
| 193 // Used to specify which frame to navigate. If empty, the main frame is | 192 // Used to specify which frame to navigate. If empty, the main frame is |
| 194 // navigated. This is currently only used in tests. | 193 // navigated. This is currently only used in tests. |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 | 495 |
| 497 private: | 496 private: |
| 498 // This interface should only be implemented inside content. | 497 // This interface should only be implemented inside content. |
| 499 friend class NavigationControllerImpl; | 498 friend class NavigationControllerImpl; |
| 500 NavigationController() {} | 499 NavigationController() {} |
| 501 }; | 500 }; |
| 502 | 501 |
| 503 } // namespace content | 502 } // namespace content |
| 504 | 503 |
| 505 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 504 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| OLD | NEW |