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

Unified Diff: chrome/browser/content_settings/permission_context_base.h

Issue 1153873003: Add way for PermissionContext to be automatically restricted to secure origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@midi_permission_sysex
Patch Set: typo Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/content_settings/permission_context_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/permission_context_base.h
diff --git a/chrome/browser/content_settings/permission_context_base.h b/chrome/browser/content_settings/permission_context_base.h
index 0f24beedf833c7f999bbd32fd8cf63e6820db64d..61a6937bcdbe1353f080c35aaac45d3f2984f657 100644
--- a/chrome/browser/content_settings/permission_context_base.h
+++ b/chrome/browser/content_settings/permission_context_base.h
@@ -46,6 +46,7 @@ using BrowserPermissionCallback = base::Callback<void(ContentSetting)>;
// After this you can override several other methods to customize behavior,
// in particular it is advised to override UpdateTabContext in order to manage
// the permission from the omnibox.
+// It is mandatory to override IsRestrictedToSecureOrigin.
// See midi_permission_context.h/cc or push_permission_context.cc/h for some
// examples.
@@ -123,6 +124,9 @@ class PermissionContextBase : public KeyedService {
const GURL& embedding_origin,
ContentSetting content_setting);
+ // Whether the permission should be restricted to secure origins.
+ virtual bool IsRestrictedToSecureOrigins() const = 0;
+
private:
// Called when a bubble is no longer used so it can be cleaned up.
void CleanUpBubble(const PermissionRequestID& id);
« no previous file with comments | « no previous file | chrome/browser/content_settings/permission_context_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698