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/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 12 #include "content/public/browser/url_data_source_delegate.h" |
12 | 13 |
13 // A DataSource for chrome://resources/ URLs. | 14 // A DataSource for chrome://resources/ URLs. |
14 class SharedResourcesDataSource : public ChromeURLDataManager::DataSource { | 15 class SharedResourcesDataSource : public content::URLDataSourceDelegate { |
15 public: | 16 public: |
16 SharedResourcesDataSource(); | 17 SharedResourcesDataSource(); |
17 | 18 |
18 // Overridden from ChromeURLDataManager::DataSource: | 19 // content::URLDataSourceDelegate implementation. |
| 20 virtual std::string GetSource() OVERRIDE; |
19 virtual void StartDataRequest(const std::string& path, | 21 virtual void StartDataRequest(const std::string& path, |
20 bool is_incognito, | 22 bool is_incognito, |
21 int request_id) OVERRIDE; | 23 int request_id) OVERRIDE; |
22 virtual std::string GetMimeType(const std::string&) const OVERRIDE; | 24 virtual std::string GetMimeType(const std::string&) const OVERRIDE; |
23 | 25 |
24 private: | 26 private: |
25 virtual ~SharedResourcesDataSource(); | 27 virtual ~SharedResourcesDataSource(); |
26 | 28 |
27 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource); | 29 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource); |
28 }; | 30 }; |
29 | 31 |
30 #endif // CHROME_BROWSER_UI_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ | 32 #endif // CHROME_BROWSER_UI_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ |
OLD | NEW |