Use multiline attribute to check for IA2_STATE_MULTILINE.
[chromium-blink-merge.git] / content / browser / loader / navigation_url_loader.h
blob1043c681dede0e10bbc169221f0bd832e1a2da91
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_
8 #include "base/basictypes.h"
9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "content/common/content_export.h"
13 namespace content {
15 class BrowserContext;
16 class NavigationURLLoaderDelegate;
17 class NavigationURLLoaderFactory;
18 struct CommonNavigationParams;
19 struct NavigationRequestInfo;
21 // PlzNavigate: The navigation logic's UI thread entry point into the resource
22 // loading stack. It exposes an interface to control the request prior to
23 // receiving the response. If the NavigationURLLoader is destroyed before
24 // OnResponseStarted is called, the request is aborted.
25 class CONTENT_EXPORT NavigationURLLoader {
26 public:
27 // Creates a NavigationURLLoader. The caller is responsible for ensuring that
28 // |delegate| outlives the loader. |request_body| must not be accessed on the
29 // UI thread after this point.
31 // TODO(davidben): When navigation is disentangled from the loader, the
32 // request parameters should not come in as a navigation-specific
33 // structure. Information like has_user_gesture and
34 // should_replace_current_entry shouldn't be needed at this layer.
35 static scoped_ptr<NavigationURLLoader> Create(
36 BrowserContext* browser_context,
37 int64 frame_tree_node_id,
38 scoped_ptr<NavigationRequestInfo> request_info,
39 NavigationURLLoaderDelegate* delegate);
41 // For testing purposes; sets the factory for use in testing.
42 static void SetFactoryForTesting(NavigationURLLoaderFactory* factory);
44 virtual ~NavigationURLLoader() {}
46 // Called in response to OnRequestRedirected to continue processing the
47 // request.
48 virtual void FollowRedirect() = 0;
50 protected:
51 NavigationURLLoader() {}
53 private:
54 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoader);
57 } // namespace content
59 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_