| 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 CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ | 5 #ifndef CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ |
| 6 #define CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ | 6 #define CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "content/public/browser/url_data_source.h" | 10 #include "content/public/browser/url_data_source.h" |
| 11 | 11 |
| 12 namespace content { |
| 13 |
| 12 // A DataSource for chrome://resources/ URLs. | 14 // A DataSource for chrome://resources/ URLs. |
| 13 class SharedResourcesDataSource : public content::URLDataSource { | 15 class SharedResourcesDataSource : public URLDataSource { |
| 14 public: | 16 public: |
| 15 SharedResourcesDataSource(); | 17 SharedResourcesDataSource(); |
| 16 | 18 |
| 17 // content::URLDataSource implementation. | 19 // URLDataSource implementation. |
| 18 std::string GetSource() const override; | 20 std::string GetSource() const override; |
| 19 void StartDataRequest( | 21 void StartDataRequest( |
| 20 const std::string& path, | 22 const std::string& path, |
| 21 int render_process_id, | 23 int render_process_id, |
| 22 int render_frame_id, | 24 int render_frame_id, |
| 23 const content::URLDataSource::GotDataCallback& callback) override; | 25 const URLDataSource::GotDataCallback& callback) override; |
| 24 std::string GetMimeType(const std::string&) const override; | 26 std::string GetMimeType(const std::string&) const override; |
| 25 std::string GetAccessControlAllowOriginForOrigin( | 27 std::string GetAccessControlAllowOriginForOrigin( |
| 26 const std::string& origin) const override; | 28 const std::string& origin) const override; |
| 27 | 29 |
| 28 private: | 30 private: |
| 29 ~SharedResourcesDataSource() override; | 31 ~SharedResourcesDataSource() override; |
| 30 | 32 |
| 31 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource); | 33 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource); |
| 32 }; | 34 }; |
| 33 | 35 |
| 36 } // namespace content |
| 37 |
| 34 #endif // CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ | 38 #endif // CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ |
| OLD | NEW |