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_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 scoped_ptr<content::StreamInfo> stream) override; | 69 scoped_ptr<content::StreamInfo> stream) override; |
70 void OnResponseStarted(net::URLRequest* request, | 70 void OnResponseStarted(net::URLRequest* request, |
71 content::ResourceContext* resource_context, | 71 content::ResourceContext* resource_context, |
72 content::ResourceResponse* response, | 72 content::ResourceResponse* response, |
73 IPC::Sender* sender) override; | 73 IPC::Sender* sender) override; |
74 void OnRequestRedirected(const GURL& redirect_url, | 74 void OnRequestRedirected(const GURL& redirect_url, |
75 net::URLRequest* request, | 75 net::URLRequest* request, |
76 content::ResourceContext* resource_context, | 76 content::ResourceContext* resource_context, |
77 content::ResourceResponse* response) override; | 77 content::ResourceResponse* response) override; |
78 void RequestComplete(net::URLRequest* url_request) override; | 78 void RequestComplete(net::URLRequest* url_request) override; |
| 79 bool ShouldEnableLoFiMode( |
| 80 const net::URLRequest& url_request, |
| 81 content::ResourceContext* resource_context) override; |
79 | 82 |
80 // Called on the UI thread. Allows switching out the | 83 // Called on the UI thread. Allows switching out the |
81 // ExternalProtocolHandler::Delegate for testing code. | 84 // ExternalProtocolHandler::Delegate for testing code. |
82 static void SetExternalProtocolHandlerDelegateForTesting( | 85 static void SetExternalProtocolHandlerDelegateForTesting( |
83 ExternalProtocolHandler::Delegate* delegate); | 86 ExternalProtocolHandler::Delegate* delegate); |
84 | 87 |
85 private: | 88 private: |
86 #if defined(ENABLE_EXTENSIONS) | 89 #if defined(ENABLE_EXTENSIONS) |
87 struct StreamTargetInfo { | 90 struct StreamTargetInfo { |
88 std::string extension_id; | 91 std::string extension_id; |
(...skipping 11 matching lines...) Expand all Loading... |
100 scoped_refptr<SafeBrowsingService> safe_browsing_; | 103 scoped_refptr<SafeBrowsingService> safe_browsing_; |
101 #if defined(ENABLE_EXTENSIONS) | 104 #if defined(ENABLE_EXTENSIONS) |
102 scoped_refptr<extensions::UserScriptListener> user_script_listener_; | 105 scoped_refptr<extensions::UserScriptListener> user_script_listener_; |
103 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; | 106 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; |
104 #endif | 107 #endif |
105 | 108 |
106 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); | 109 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); |
107 }; | 110 }; |
108 | 111 |
109 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE
_H_ | 112 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE
_H_ |
OLD | NEW |