OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
dpapad
2016/11/17 01:50:07
2016
Dan Beam
2016/11/17 02:50:14
Done.
| |
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); | |
dpapad
2016/11/17 01:50:07
Can you verify that C++ is also checking for this
Dan Beam
2016/11/17 02:50:14
https://cs.chromium.org/chromium/src/chrome/browse
| |
32 settings.ExtensionControlBrowserProxyImpl.getInstance().disableExtension( | |
33 assert(this.extensionId)); | |
34 this.fire('extension-disable'); | |
35 }, | |
36 }); | |
OLD | NEW |