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

Unified Diff: chrome/browser/ui/website_settings/permission_menu_model.cc

Issue 2715233004: views: use shorter menu strings in Harmony website settings (Closed)
Patch Set: Created 3 years, 10 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 | « chrome/browser/ui/views/website_settings/permission_selector_row.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/website_settings/permission_menu_model.cc
diff --git a/chrome/browser/ui/website_settings/permission_menu_model.cc b/chrome/browser/ui/website_settings/permission_menu_model.cc
index 80665ac7b554f02092ed987fda26cf6c707264b0..2828c7794e27a189cfad904b21bdac84be5c0a9e 100644
--- a/chrome/browser/ui/website_settings/permission_menu_model.cc
+++ b/chrome/browser/ui/website_settings/permission_menu_model.cc
@@ -12,6 +12,7 @@
#include "content/public/common/origin_util.h"
#include "ppapi/features/features.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/material_design/material_design_controller.h"
PermissionMenuModel::PermissionMenuModel(
Profile* profile,
@@ -61,6 +62,16 @@ PermissionMenuModel::PermissionMenuModel(
default:
break;
}
+
+ // The Material UI for site settings uses comboboxes instead of menubuttons,
+ // which means the elements of the menu themselves have to be shorter, instead
+ // of simply setting a shorter label on the menubutton.
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
+ label = WebsiteSettingsUI::PermissionActionToUIString(
+ profile, info.type, info.setting, effective_default_setting,
+ info.source);
+ }
+
AddCheckItem(CONTENT_SETTING_DEFAULT, label);
// Notifications does not support CONTENT_SETTING_ALLOW in incognito.
« no previous file with comments | « chrome/browser/ui/views/website_settings/permission_selector_row.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698