OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_ |
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_ | 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 // | 31 // |
32 // TODO(davidben): When navigation is disentangled from the loader, the | 32 // TODO(davidben): When navigation is disentangled from the loader, the |
33 // request parameters should not come in as a navigation-specific | 33 // request parameters should not come in as a navigation-specific |
34 // structure. Information like has_user_gesture and | 34 // structure. Information like has_user_gesture and |
35 // should_replace_current_entry shouldn't be needed at this layer. | 35 // should_replace_current_entry shouldn't be needed at this layer. |
36 static scoped_ptr<NavigationURLLoader> Create( | 36 static scoped_ptr<NavigationURLLoader> Create( |
37 BrowserContext* browser_context, | 37 BrowserContext* browser_context, |
38 int64 frame_tree_node_id, | 38 int64 frame_tree_node_id, |
39 const CommonNavigationParams& common_params, | 39 const CommonNavigationParams& common_params, |
40 scoped_ptr<NavigationRequestInfo> request_info, | 40 scoped_ptr<NavigationRequestInfo> request_info, |
41 ResourceRequestBody* request_body, | |
42 NavigationURLLoaderDelegate* delegate); | 41 NavigationURLLoaderDelegate* delegate); |
43 | 42 |
44 // For testing purposes; sets the factory for use in testing. | 43 // For testing purposes; sets the factory for use in testing. |
45 static void SetFactoryForTesting(NavigationURLLoaderFactory* factory); | 44 static void SetFactoryForTesting(NavigationURLLoaderFactory* factory); |
46 | 45 |
47 virtual ~NavigationURLLoader() {} | 46 virtual ~NavigationURLLoader() {} |
48 | 47 |
49 // Called in response to OnRequestRedirected to continue processing the | 48 // Called in response to OnRequestRedirected to continue processing the |
50 // request. | 49 // request. |
51 virtual void FollowRedirect() = 0; | 50 virtual void FollowRedirect() = 0; |
52 | 51 |
53 protected: | 52 protected: |
54 NavigationURLLoader() {} | 53 NavigationURLLoader() {} |
55 | 54 |
56 private: | 55 private: |
57 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoader); | 56 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoader); |
58 }; | 57 }; |
59 | 58 |
60 } // namespace content | 59 } // namespace content |
61 | 60 |
62 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_ | 61 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_ |
OLD | NEW |