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

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

Issue 1470823002: Enable builtin Mojo JS modules in layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usb-testing
Patch Set: oops, clumsy Created 4 years, 11 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) 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 "base/callback.h" 8 #include "base/callback.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Used by SetRequestFilter. The string parameter is the path of the request. 65 // 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 66 // 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 67 // true is returned and the GotDataCallback parameter is called either then or
68 // asynchronously with the response. 68 // asynchronously with the response.
69 typedef base::Callback<bool(const std::string&, const GotDataCallback&)> 69 typedef base::Callback<bool(const std::string&, const GotDataCallback&)>
70 HandleRequestCallback; 70 HandleRequestCallback;
71 71
72 // Allows a caller to add a filter for URL requests. 72 // Allows a caller to add a filter for URL requests.
73 virtual void SetRequestFilter(const HandleRequestCallback& callback) = 0; 73 virtual void SetRequestFilter(const HandleRequestCallback& callback) = 0;
74 74
75 // Adds the necessary resources for mojo bindings.
76 virtual void AddMojoResources() = 0;
77
78 // The following map to methods on URLDataSource. See the documentation there. 75 // The following map to methods on URLDataSource. See the documentation there.
79 // NOTE: it's not acceptable to call DisableContentSecurityPolicy for new 76 // NOTE: it's not acceptable to call DisableContentSecurityPolicy for new
80 // pages, see URLDataSource::ShouldAddContentSecurityPolicy and talk to 77 // pages, see URLDataSource::ShouldAddContentSecurityPolicy and talk to
81 // tsepez. 78 // tsepez.
82 79
83 // Currently only used by embedders for WebUIs with multiple instances. 80 // Currently only used by embedders for WebUIs with multiple instances.
84 virtual void DisableReplaceExistingSource() = 0; 81 virtual void DisableReplaceExistingSource() = 0;
85 virtual void DisableContentSecurityPolicy() = 0; 82 virtual void DisableContentSecurityPolicy() = 0;
86 virtual void OverrideContentSecurityPolicyObjectSrc( 83 virtual void OverrideContentSecurityPolicyObjectSrc(
87 const std::string& data) = 0; 84 const std::string& data) = 0;
88 virtual void OverrideContentSecurityPolicyFrameSrc( 85 virtual void OverrideContentSecurityPolicyFrameSrc(
89 const std::string& data) = 0; 86 const std::string& data) = 0;
90 virtual void DisableDenyXFrameOptions() = 0; 87 virtual void DisableDenyXFrameOptions() = 0;
91 }; 88 };
92 89
93 } // namespace content 90 } // namespace content
94 91
95 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ 92 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_mojo_browsertest.cc ('k') | content/public/common/bindings_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698