| 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 <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // be set for incognito profiles. Called on the UI thread. | 45 // be set for incognito profiles. Called on the UI thread. |
| 46 CONTENT_EXPORT static std::unique_ptr< | 46 CONTENT_EXPORT static std::unique_ptr< |
| 47 net::URLRequestJobFactory::ProtocolHandler> | 47 net::URLRequestJobFactory::ProtocolHandler> |
| 48 CreateProtocolHandler(content::ResourceContext* resource_context, | 48 CreateProtocolHandler(content::ResourceContext* resource_context, |
| 49 bool is_incognito, | 49 bool is_incognito, |
| 50 ChromeBlobStorageContext* blob_storage_context); | 50 ChromeBlobStorageContext* blob_storage_context); |
| 51 | 51 |
| 52 // Adds a DataSource to the collection of data sources. | 52 // Adds a DataSource to the collection of data sources. |
| 53 void AddDataSource(URLDataSourceImpl* source); | 53 void AddDataSource(URLDataSourceImpl* source); |
| 54 | 54 |
| 55 // DataSource invokes this. Sends the data to the URLRequest. | 55 // DataSource invokes this. Sends the data to the URLRequest. |bytes| may be |
| 56 // null, which signals an error handling the request. |
| 56 void DataAvailable(RequestID request_id, base::RefCountedMemory* bytes); | 57 void DataAvailable(RequestID request_id, base::RefCountedMemory* bytes); |
| 57 | 58 |
| 58 static net::URLRequestJob* Factory(net::URLRequest* request, | 59 static net::URLRequestJob* Factory(net::URLRequest* request, |
| 59 const std::string& scheme); | 60 const std::string& scheme); |
| 60 | 61 |
| 61 private: | 62 private: |
| 62 friend class URLRequestChromeJob; | 63 friend class URLRequestChromeJob; |
| 63 | 64 |
| 64 typedef std::map<std::string, | 65 typedef std::map<std::string, |
| 65 scoped_refptr<URLDataSourceImpl> > DataSourceMap; | 66 scoped_refptr<URLDataSourceImpl> > DataSourceMap; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 107 |
| 107 // Creates protocol handler for chrome-devtools://. |is_incognito| should be | 108 // Creates protocol handler for chrome-devtools://. |is_incognito| should be |
| 108 // set for incognito profiles. | 109 // set for incognito profiles. |
| 109 net::URLRequestJobFactory::ProtocolHandler* | 110 net::URLRequestJobFactory::ProtocolHandler* |
| 110 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, | 111 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, |
| 111 bool is_incognito); | 112 bool is_incognito); |
| 112 | 113 |
| 113 } // namespace content | 114 } // namespace content |
| 114 | 115 |
| 115 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ | 116 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ |
| OLD | NEW |