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

Side by Side Diff: chrome/browser/resources/settings/extension_control_browser_proxy.js

Issue 2509543002: MD Settings: create a shared handler/browser proxy to control extensions (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 cr.define('settings', function() {
6 /** @interface */
7 function ExtensionControlBrowserProxy() {}
8
9 ExtensionControlBrowserProxy.prototype = {
10 // TODO(dbeam): should be be returning !Promise<boolean> to indicate whether
11 // it succeeded?
12 /** @param {string} extensionId */
13 disableExtension: assertNotReached,
14
15 /** @param {string} extensionId */
16 manageExtension: assertNotReached,
17 };
18
19 /**
20 * @implements {settings.ExtensionControlBrowserProxy}
21 * @constructor
22 */
23 function ExtensionControlBrowserProxyImpl() {}
24 cr.addSingletonGetter(ExtensionControlBrowserProxyImpl);
25
26 ExtensionControlBrowserProxyImpl.prototype = {
27 /** @override */
28 disableExtension: function(extensionId) {
29 chrome.send('disableExtension', [extensionId]);
30 },
31
32 /** @override */
33 manageExtension: function(extensionId) {
34 window.open('chrome://extensions?id=' + extensionId);
35 },
36 };
37
38 return {
39 ExtensionControlBrowserProxy: ExtensionControlBrowserProxy,
40 ExtensionControlBrowserProxyImpl: ExtensionControlBrowserProxyImpl,
41 };
42 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698