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

Unified Diff: chrome/browser/guestview/guestview.cc

Issue 78303005: ContentSettings API should not interact with <webview> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Jochen's remaining comments Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/guestview/guestview.cc
diff --git a/chrome/browser/guestview/guestview.cc b/chrome/browser/guestview/guestview.cc
index c125f6e1d332da8fd0907db49af69359d68fbfa0..82ea957ffe859997943c62db64e731a69fdd051e 100644
--- a/chrome/browser/guestview/guestview.cc
+++ b/chrome/browser/guestview/guestview.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/guestview/guestview_constants.h"
#include "chrome/browser/guestview/webview/webview_guest.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/content_settings.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
@@ -118,6 +119,24 @@ bool GuestView::GetGuestPartitionConfigForSite(const GURL& site,
return true;
}
+// static
+void GuestView::GetDefaultContentSettingRules(
+ RendererContentSettingRules* rules, bool incognito) {
+ rules->image_rules.push_back(ContentSettingPatternSource(
+ ContentSettingsPattern::Wildcard(),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTING_ALLOW,
+ std::string(),
+ incognito));
+
+ rules->script_rules.push_back(ContentSettingPatternSource(
+ ContentSettingsPattern::Wildcard(),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTING_ALLOW,
+ std::string(),
+ incognito));
+}
+
void GuestView::Attach(content::WebContents* embedder_web_contents,
const base::DictionaryValue& args) {
embedder_web_contents_ = embedder_web_contents;

Powered by Google App Engine
This is Rietveld 408576698