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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.h

Issue 1447813002: Add USB devices to the content settings page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get_all_objects
Patch Set: Rebased. Created 5 years, 1 month 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/ui/webui/options/content_settings_handler.h
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.h b/chrome/browser/ui/webui/options/content_settings_handler.h
index 3cd3e566cb307296a768af528de76907d710cd3d..0b2c38ce368fe7aefe8963523504fc4b0f108a95 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.h
+++ b/chrome/browser/ui/webui/options/content_settings_handler.h
@@ -31,6 +31,8 @@ class ContentSettingsHandler : public OptionsPageUIHandler,
public content::NotificationObserver,
public PepperFlashSettingsManager::Client {
public:
+ struct ChooserTypeNameEntry;
+
ContentSettingsHandler();
~ContentSettingsHandler() override;
@@ -149,6 +151,14 @@ class ContentSettingsHandler : public OptionsPageUIHandler,
// Clobbers and rebuilds just the MIDI SysEx exception table.
void UpdateMIDISysExExceptionsView();
+ // Clobbers and rebuilds all chooser-based exception tables.
+ void UpdateAllChooserExceptionsViewsFromModel();
+
+ // Clobbers and rebuilds the exception table for a particular chooser-based
+ // permission.
+ void UpdateChooserExceptionsViewFromModel(
+ const ChooserTypeNameEntry& chooser_type);
+
// Modifies the zoom level exceptions list to display correct chrome
// signin page entry. When the legacy (non-WebView-based) signin page
// goes away, this function can be removed.
@@ -187,6 +197,11 @@ class ContentSettingsHandler : public OptionsPageUIHandler,
// RemoveException().
void RemoveZoomLevelException(const base::ListValue* args);
+ // Removes one exception for a chooser-based permission. |args| contains the
+ // parameters passed to RemoveException().
+ void RemoveChooserException(const ChooserTypeNameEntry* chooser_type,
+ const base::ListValue* args);
+
// Callbacks used by the page ------------------------------------------------
// Sets the default value for a specific content type. |args| includes the
@@ -227,7 +242,9 @@ class ContentSettingsHandler : public OptionsPageUIHandler,
// Returns exceptions constructed from the policy-set allowed URLs
// for the content settings |type| mic or camera.
- scoped_ptr<base::ListValue> GetPolicyAllowedUrls(ContentSettingsType type);
+ void GetPolicyAllowedUrls(
+ ContentSettingsType type,
+ std::vector<scoped_ptr<base::DictionaryValue>>* exceptions);
// Fills in |exceptions| with Values for the given |type| from |map|.
void GetExceptionsFromHostContentSettingsMap(

Powered by Google App Engine
This is Rietveld 408576698