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

Side by Side Diff: content/public/browser/web_ui_data_source.h

Issue 2255833003: DO NOT COMMIT: hack hack hacking on preloading md-settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: to show dave Created 4 years, 4 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
« no previous file with comments | « content/public/browser/url_data_source.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_
7 7
8 #include <map>
9 #include <string>
10
8 #include "base/callback.h" 11 #include "base/callback.h"
9 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
10 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
11 14
12 namespace base { 15 namespace base {
13 class DictionaryValue; 16 class DictionaryValue;
14 class RefCountedMemory; 17 class RefCountedMemory;
15 } 18 }
16 19
17 namespace content { 20 namespace content {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Used by SetRequestFilter. The string parameter is the path of the request. 68 // Used by SetRequestFilter. The string parameter is the path of the request.
66 // If the callee doesn't want to handle the data, false is returned. Otherwise 69 // If the callee doesn't want to handle the data, false is returned. Otherwise
67 // true is returned and the GotDataCallback parameter is called either then or 70 // true is returned and the GotDataCallback parameter is called either then or
68 // asynchronously with the response. 71 // asynchronously with the response.
69 typedef base::Callback<bool(const std::string&, const GotDataCallback&)> 72 typedef base::Callback<bool(const std::string&, const GotDataCallback&)>
70 HandleRequestCallback; 73 HandleRequestCallback;
71 74
72 // Allows a caller to add a filter for URL requests. 75 // Allows a caller to add a filter for URL requests.
73 virtual void SetRequestFilter(const HandleRequestCallback& callback) = 0; 76 virtual void SetRequestFilter(const HandleRequestCallback& callback) = 0;
74 77
78 virtual const std::map<std::string, int>& path_to_idr_map() const = 0;
79
75 // The following map to methods on URLDataSource. See the documentation there. 80 // The following map to methods on URLDataSource. See the documentation there.
76 // NOTE: it's not acceptable to call DisableContentSecurityPolicy for new 81 // NOTE: it's not acceptable to call DisableContentSecurityPolicy for new
77 // pages, see URLDataSource::ShouldAddContentSecurityPolicy and talk to 82 // pages, see URLDataSource::ShouldAddContentSecurityPolicy and talk to
78 // tsepez. 83 // tsepez.
79 84
80 // Currently only used by embedders for WebUIs with multiple instances. 85 // Currently only used by embedders for WebUIs with multiple instances.
81 virtual void DisableReplaceExistingSource() = 0; 86 virtual void DisableReplaceExistingSource() = 0;
82 virtual void DisableContentSecurityPolicy() = 0; 87 virtual void DisableContentSecurityPolicy() = 0;
83 virtual void OverrideContentSecurityPolicyObjectSrc( 88 virtual void OverrideContentSecurityPolicyObjectSrc(
84 const std::string& data) = 0; 89 const std::string& data) = 0;
85 virtual void OverrideContentSecurityPolicyChildSrc( 90 virtual void OverrideContentSecurityPolicyChildSrc(
86 const std::string& data) = 0; 91 const std::string& data) = 0;
87 virtual void DisableDenyXFrameOptions() = 0; 92 virtual void DisableDenyXFrameOptions() = 0;
93
94 virtual void AddPreloadHeader(const std::string& preload_header) = 0;
88 }; 95 };
89 96
90 } // namespace content 97 } // namespace content
91 98
92 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ 99 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « content/public/browser/url_data_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698