OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 IOS_INTERNAL_WEB_WEBUI_URL_DATA_MANAGER_BACKEND_IOS_H_ | 5 #ifndef IOS_INTERNAL_WEB_WEBUI_URL_DATA_MANAGER_BACKEND_IOS_H_ |
6 #define IOS_INTERNAL_WEB_WEBUI_URL_DATA_MANAGER_BACKEND_IOS_H_ | 6 #define IOS_INTERNAL_WEB_WEBUI_URL_DATA_MANAGER_BACKEND_IOS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 21 matching lines...) Expand all Loading... |
32 // and ignore this class. URLDataManagerIOSBackend is owned by BrowserState. | 32 // and ignore this class. URLDataManagerIOSBackend is owned by BrowserState. |
33 class URLDataManagerIOSBackend : public base::SupportsUserData::Data { | 33 class URLDataManagerIOSBackend : public base::SupportsUserData::Data { |
34 public: | 34 public: |
35 typedef int RequestID; | 35 typedef int RequestID; |
36 | 36 |
37 URLDataManagerIOSBackend(); | 37 URLDataManagerIOSBackend(); |
38 ~URLDataManagerIOSBackend() override; | 38 ~URLDataManagerIOSBackend() override; |
39 | 39 |
40 // Invoked to create the protocol handler for chrome://. |is_incognito| should | 40 // Invoked to create the protocol handler for chrome://. |is_incognito| should |
41 // be set for incognito browser states. Called on the UI thread. | 41 // be set for incognito browser states. Called on the UI thread. |
42 static net::URLRequestJobFactory::ProtocolHandler* CreateProtocolHandler( | 42 static scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
43 BrowserState* browser_state); | 43 CreateProtocolHandler(BrowserState* browser_state); |
44 | 44 |
45 // Adds a DataSource to the collection of data sources. | 45 // Adds a DataSource to the collection of data sources. |
46 void AddDataSource(URLDataSourceIOSImpl* source); | 46 void AddDataSource(URLDataSourceIOSImpl* source); |
47 | 47 |
48 // DataSource invokes this. Sends the data to the URLRequest. | 48 // DataSource invokes this. Sends the data to the URLRequest. |
49 void DataAvailable(RequestID request_id, base::RefCountedMemory* bytes); | 49 void DataAvailable(RequestID request_id, base::RefCountedMemory* bytes); |
50 | 50 |
51 static net::URLRequestJob* Factory(net::URLRequest* request, | 51 static net::URLRequestJob* Factory(net::URLRequest* request, |
52 const std::string& scheme); | 52 const std::string& scheme); |
53 | 53 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // The ID we'll use for the next request we receive. | 92 // The ID we'll use for the next request we receive. |
93 RequestID next_request_id_; | 93 RequestID next_request_id_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(URLDataManagerIOSBackend); | 95 DISALLOW_COPY_AND_ASSIGN(URLDataManagerIOSBackend); |
96 }; | 96 }; |
97 | 97 |
98 } // namespace web | 98 } // namespace web |
99 | 99 |
100 #endif // IOS_INTERNAL_WEB_WEBUI_URL_DATA_MANAGER_BACKEND_IOS_H_ | 100 #endif // IOS_INTERNAL_WEB_WEBUI_URL_DATA_MANAGER_BACKEND_IOS_H_ |
OLD | NEW |