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

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: NodeList.prototype does not include forEach. 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..03ecb4259b38cc2e1209a4e5d3f96fc20d6f07c8 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.h
+++ b/chrome/browser/ui/webui/options/content_settings_handler.h
@@ -21,6 +21,7 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+struct ChooserTypeNameEntry;
class HostContentSettingsMap;
class ProtocolHandlerRegistry;
@@ -149,6 +150,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 +196,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 +241,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