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

Side by Side Diff: chrome/browser/resources/settings/controls/extension_controlled_indicator.js

Issue 2507003005: Implement extension controlled indicators, starting with New Tab page (Closed)
Patch Set: merge Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 Polymer({
6 is: 'extension-controlled-indicator',
7
8 behaviors: [I18nBehavior],
9
10 properties: {
11 extensionCanBeDisabled: Boolean,
12 extensionId: String,
13 extensionName: String,
14 },
15
16 /**
17 * @param {string} extensionId
18 * @param {string} extensionName
19 * @return {string}
20 * @private
21 */
22 getLabel_: function(extensionId, extensionName) {
23 var manageUrl = 'chrome://extensions/?id=' + assert(this.extensionId);
24 return this.i18n('controlledByExtension',
25 `<a href="${manageUrl}" target="_blank">` +
26 assert(this.extensionName) + '</a>');
27 },
28
29 /** @private */
30 onDisableTap_: function() {
31 assert(this.extensionCanBeDisabled);
32 settings.ExtensionControlBrowserProxyImpl.getInstance().disableExtension(
33 assert(this.extensionId));
34 this.fire('extension-disable');
35 },
36 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698