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_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ | 5 #ifndef CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ |
6 #define CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ | 6 #define CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/supports_user_data.h" | 14 #include "base/supports_user_data.h" |
15 #include "content/browser/webui/url_data_manager.h" | 15 #include "content/browser/webui/url_data_manager.h" |
| 16 #include "content/public/browser/url_data_source.h" |
16 #include "net/url_request/url_request_job_factory.h" | 17 #include "net/url_request/url_request_job_factory.h" |
17 | 18 |
18 class GURL; | 19 class GURL; |
19 | 20 |
20 namespace appcache { | 21 namespace appcache { |
21 class AppCacheService; | 22 class AppCacheService; |
22 } | 23 } |
23 | 24 |
24 namespace base { | 25 namespace base { |
25 class RefCountedMemory; | 26 class RefCountedMemory; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 69 |
69 // Called by the job when it's starting up. | 70 // Called by the job when it's starting up. |
70 // Returns false if |url| is not a URL managed by this object. | 71 // Returns false if |url| is not a URL managed by this object. |
71 bool StartRequest(const net::URLRequest* request, URLRequestChromeJob* job); | 72 bool StartRequest(const net::URLRequest* request, URLRequestChromeJob* job); |
72 | 73 |
73 // Helper function to call StartDataRequest on |source|'s delegate. This is | 74 // Helper function to call StartDataRequest on |source|'s delegate. This is |
74 // needed because while we want to call URLDataSourceDelegate's method, we | 75 // needed because while we want to call URLDataSourceDelegate's method, we |
75 // need to add a refcount on the source. | 76 // need to add a refcount on the source. |
76 static void CallStartRequest(scoped_refptr<URLDataSourceImpl> source, | 77 static void CallStartRequest(scoped_refptr<URLDataSourceImpl> source, |
77 const std::string& path, | 78 const std::string& path, |
78 bool is_incognito, | 79 int render_process_id, |
| 80 int render_view_id, |
79 int request_id); | 81 int request_id); |
80 | 82 |
81 // Remove a request from the list of pending requests. | 83 // Remove a request from the list of pending requests. |
82 void RemoveRequest(URLRequestChromeJob* job); | 84 void RemoveRequest(URLRequestChromeJob* job); |
83 | 85 |
84 // Returns true if the job exists in |pending_requests_|. False otherwise. | 86 // Returns true if the job exists in |pending_requests_|. False otherwise. |
85 // Called by ~URLRequestChromeJob to verify that |pending_requests_| is kept | 87 // Called by ~URLRequestChromeJob to verify that |pending_requests_| is kept |
86 // up to date. | 88 // up to date. |
87 bool HasPendingJob(URLRequestChromeJob* job) const; | 89 bool HasPendingJob(URLRequestChromeJob* job) const; |
88 | 90 |
(...skipping 13 matching lines...) Expand all Loading... |
102 | 104 |
103 // Creates protocol handler for chrome-devtools://. |is_incognito| should be | 105 // Creates protocol handler for chrome-devtools://. |is_incognito| should be |
104 // set for incognito profiles. | 106 // set for incognito profiles. |
105 net::URLRequestJobFactory::ProtocolHandler* | 107 net::URLRequestJobFactory::ProtocolHandler* |
106 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, | 108 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, |
107 bool is_incognito); | 109 bool is_incognito); |
108 | 110 |
109 } // namespace content | 111 } // namespace content |
110 | 112 |
111 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ | 113 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ |
OLD | NEW |