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

Unified Diff: chrome/browser/resources/settings/site_settings/site_list.js

Issue 2386993005: Site Settings Desktop: Switch out paper-menu for iron-dropdown. (Closed)
Patch Set: Address feedback and fix test Created 4 years, 2 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
Index: chrome/browser/resources/settings/site_settings/site_list.js
diff --git a/chrome/browser/resources/settings/site_settings/site_list.js b/chrome/browser/resources/settings/site_settings/site_list.js
index 4c4b38f988953a0b5df9755d76e4e97f21820e95..f2fcb7c1602ae812b7a6d06487c11f0aba0b208e 100644
--- a/chrome/browser/resources/settings/site_settings/site_list.js
+++ b/chrome/browser/resources/settings/site_settings/site_list.js
@@ -425,15 +425,15 @@ Polymer({
/**
* A handler for activating one of the menu action items.
- * @param {!{model: !{item: !{origin: string}},
- * detail: !{selected: string}}} event
+ * @param {!{model: !{item: !{origin: string}}}} event
+ * @param {string} action The permission to set (Allow, Block, SessionOnly,
+ * etc).
* @private
*/
- onActionMenuIronActivate_: function(event) {
+ onActionMenuActivate_: function(event, action) {
var origin = event.model.item.origin;
var incognito = event.model.item.incognito;
var embeddingOrigin = event.model.item.embeddingOrigin;
- var action = event.detail.selected;
if (action == settings.PermissionValues.DEFAULT) {
this.browserProxy.resetCategoryPermissionForOrigin(
origin, embeddingOrigin, this.category, incognito);
@@ -443,6 +443,26 @@ Polymer({
}
},
+ /** @private */
+ onAllowTap_: function(event) {
+ this.onActionMenuActivate_(event, settings.PermissionValues.ALLOW);
+ },
+
+ /** @private */
+ onBlockTap_: function(event) {
+ this.onActionMenuActivate_(event, settings.PermissionValues.BLOCK);
+ },
+
+ /** @private */
+ onSessionOnlyTap_: function(event) {
+ this.onActionMenuActivate_(event, settings.PermissionValues.SESSION_ONLY);
+ },
+
+ /** @private */
+ onResetTap_: function(event) {
+ this.onActionMenuActivate_(event, settings.PermissionValues.DEFAULT);
+ },
+
/**
* Returns the appropriate header value for display.
* @param {Array<string>} siteList The list of all sites to display for this
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.html ('k') | chrome/test/data/webui/settings/site_list_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698