OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "content/public/browser/url_data_source_delegate.h" | 12 #include "content/public/browser/url_data_source.h" |
13 | 13 |
14 // A DataSource for chrome://resources/ URLs. | 14 // A DataSource for chrome://resources/ URLs. |
15 class SharedResourcesDataSource : public content::URLDataSourceDelegate { | 15 class SharedResourcesDataSource : public content::URLDataSource { |
16 public: | 16 public: |
17 SharedResourcesDataSource(); | 17 SharedResourcesDataSource(); |
18 | 18 |
19 // content::URLDataSourceDelegate implementation. | 19 // content::URLDataSource implementation. |
20 virtual std::string GetSource() OVERRIDE; | 20 virtual std::string GetSource() OVERRIDE; |
21 virtual void StartDataRequest(const std::string& path, | 21 virtual void StartDataRequest( |
22 bool is_incognito, | 22 const std::string& path, |
23 int request_id) OVERRIDE; | 23 bool is_incognito, |
| 24 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; |
24 virtual std::string GetMimeType(const std::string&) const OVERRIDE; | 25 virtual std::string GetMimeType(const std::string&) const OVERRIDE; |
25 | 26 |
26 private: | 27 private: |
27 virtual ~SharedResourcesDataSource(); | 28 virtual ~SharedResourcesDataSource(); |
28 | 29 |
29 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource); | 30 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource); |
30 }; | 31 }; |
31 | 32 |
32 #endif // CHROME_BROWSER_UI_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ | 33 #endif // CHROME_BROWSER_UI_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ |
OLD | NEW |