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 CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
6 #define CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "chrome/browser/external_protocol/external_protocol_handler.h" | 16 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
17 #include "content/public/browser/resource_dispatcher_host_delegate.h" | 17 #include "content/public/browser/resource_dispatcher_host_delegate.h" |
| 18 #include "content/public/common/previews_state.h" |
18 #include "extensions/features/features.h" | 19 #include "extensions/features/features.h" |
19 | 20 |
20 class DownloadRequestLimiter; | 21 class DownloadRequestLimiter; |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 class NavigationData; | 24 class NavigationData; |
24 } | 25 } |
25 | 26 |
26 namespace extensions { | 27 namespace extensions { |
27 class UserScriptListener; | 28 class UserScriptListener; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void OnStreamCreated(net::URLRequest* request, | 77 void OnStreamCreated(net::URLRequest* request, |
77 std::unique_ptr<content::StreamInfo> stream) override; | 78 std::unique_ptr<content::StreamInfo> stream) override; |
78 void OnResponseStarted(net::URLRequest* request, | 79 void OnResponseStarted(net::URLRequest* request, |
79 content::ResourceContext* resource_context, | 80 content::ResourceContext* resource_context, |
80 content::ResourceResponse* response) override; | 81 content::ResourceResponse* response) override; |
81 void OnRequestRedirected(const GURL& redirect_url, | 82 void OnRequestRedirected(const GURL& redirect_url, |
82 net::URLRequest* request, | 83 net::URLRequest* request, |
83 content::ResourceContext* resource_context, | 84 content::ResourceContext* resource_context, |
84 content::ResourceResponse* response) override; | 85 content::ResourceResponse* response) override; |
85 void RequestComplete(net::URLRequest* url_request) override; | 86 void RequestComplete(net::URLRequest* url_request) override; |
86 bool ShouldEnableLoFiMode( | 87 // Returns a bitmask of potentially several Previews optimizations. |
| 88 content::PreviewsState GetPreviewsState( |
87 const net::URLRequest& url_request, | 89 const net::URLRequest& url_request, |
88 content::ResourceContext* resource_context) override; | 90 content::ResourceContext* resource_context) override; |
89 content::NavigationData* GetNavigationData( | 91 content::NavigationData* GetNavigationData( |
90 net::URLRequest* request) const override; | 92 net::URLRequest* request) const override; |
91 std::unique_ptr<net::ClientCertStore> CreateClientCertStore( | 93 std::unique_ptr<net::ClientCertStore> CreateClientCertStore( |
92 content::ResourceContext* resource_context) override; | 94 content::ResourceContext* resource_context) override; |
93 void OnAbortedFrameLoad(const GURL& url, | 95 void OnAbortedFrameLoad(const GURL& url, |
94 base::TimeDelta request_loading_time) override; | 96 base::TimeDelta request_loading_time) override; |
95 | 97 |
96 // Called on the UI thread. Allows switching out the | 98 // Called on the UI thread. Allows switching out the |
(...skipping 21 matching lines...) Expand all Loading... |
118 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_; | 120 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_; |
119 #if BUILDFLAG(ENABLE_EXTENSIONS) | 121 #if BUILDFLAG(ENABLE_EXTENSIONS) |
120 scoped_refptr<extensions::UserScriptListener> user_script_listener_; | 122 scoped_refptr<extensions::UserScriptListener> user_script_listener_; |
121 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; | 123 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; |
122 #endif | 124 #endif |
123 | 125 |
124 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); | 126 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); |
125 }; | 127 }; |
126 | 128 |
127 #endif // CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 129 #endif // CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
OLD | NEW |