Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: content/browser/webui/shared_resources_data_source.h

Issue 613733002: Enabled CORS for chrome://resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge conflict resolved (OVERRIDE->override). Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // A DataSource for chrome://resources/ URLs. 12 // A DataSource for chrome://resources/ URLs.
13 class SharedResourcesDataSource : public content::URLDataSource { 13 class SharedResourcesDataSource : public content::URLDataSource {
14 public: 14 public:
15 SharedResourcesDataSource(); 15 SharedResourcesDataSource();
16 16
17 // content::URLDataSource implementation. 17 // content::URLDataSource implementation.
18 virtual std::string GetSource() const override; 18 virtual std::string GetSource() const override;
19 virtual void StartDataRequest( 19 virtual void StartDataRequest(
20 const std::string& path, 20 const std::string& path,
21 int render_process_id, 21 int render_process_id,
22 int render_frame_id, 22 int render_frame_id,
23 const content::URLDataSource::GotDataCallback& callback) override; 23 const content::URLDataSource::GotDataCallback& callback) override;
24 virtual std::string GetMimeType(const std::string&) const override; 24 virtual std::string GetMimeType(const std::string&) const override;
25 virtual std::string GetAccessControlAllowOriginForOrigin(
26 const std::string& origin) const override;
25 27
26 private: 28 private:
27 virtual ~SharedResourcesDataSource(); 29 virtual ~SharedResourcesDataSource();
28 30
29 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource); 31 DISALLOW_COPY_AND_ASSIGN(SharedResourcesDataSource);
30 }; 32 };
31 33
32 #endif // CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_ 34 #endif // CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | content/browser/webui/shared_resources_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698