| Index: chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
|
| diff --git a/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js b/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
|
| index 5e63b925681784708b52ce06a153d93b5069e74d..d84e6c061d2de3457a42a4ddf18d0a0579efecd7 100644
|
| --- a/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
|
| +++ b/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
|
| @@ -76,161 +76,157 @@ settings.NoteAppInfo;
|
|
|
| cr.define('settings', function() {
|
| /** @interface */
|
| - function DevicePageBrowserProxy() {}
|
| -
|
| - DevicePageBrowserProxy.prototype = {
|
| + class DevicePageBrowserProxy {
|
| /** Initializes the mouse and touchpad handler. */
|
| - initializePointers: function() {},
|
| + initializePointers() {}
|
|
|
| /** Initializes the stylus handler. */
|
| - initializeStylus: function() {},
|
| + initializeStylus() {}
|
|
|
| /**
|
| * Override to interact with the on-tap/on-keydown event on the Learn More
|
| * link.
|
| * @param {!Event} e
|
| */
|
| - handleLinkEvent: function(e) {},
|
| + handleLinkEvent(e) {}
|
|
|
| /** Initializes the keyboard WebUI handler. */
|
| - initializeKeyboard: function() {},
|
| + initializeKeyboard() {}
|
|
|
| /** Shows the Ash keyboard shortcuts overlay. */
|
| - showKeyboardShortcutsOverlay: function() {},
|
| + showKeyboardShortcutsOverlay() {}
|
|
|
| /** Requests a power status update. */
|
| - updatePowerStatus: function() {},
|
| + updatePowerStatus() {}
|
|
|
| /**
|
| * Sets the ID of the power source to use.
|
| * @param {string} powerSourceId ID of the power source. '' denotes the
|
| * battery (no external power source).
|
| */
|
| - setPowerSource: function(powerSourceId) {},
|
| + setPowerSource(powerSourceId) {}
|
|
|
| /** Requests the current power management settings. */
|
| - requestPowerManagementSettings: function() {},
|
| + requestPowerManagementSettings() {}
|
|
|
| /**
|
| * Sets the idle power management behavior.
|
| * @param {settings.IdleBehavior} behavior Idle behavior.
|
| */
|
| - setIdleBehavior: function(behavior) {},
|
| + setIdleBehavior(behavior) {}
|
|
|
| /**
|
| * Sets the lid-closed power management behavior.
|
| * @param {settings.LidClosedBehavior} behavior Lid-closed behavior.
|
| */
|
| - setLidClosedBehavior: function(behavior) {},
|
| + setLidClosedBehavior(behavior) {}
|
|
|
| /**
|
| * |callback| is run when there is new note-taking app information
|
| * available or after |requestNoteTakingApps| has been called.
|
| * @param {function(Array<settings.NoteAppInfo>, boolean):void} callback
|
| */
|
| - setNoteTakingAppsUpdatedCallback: function(callback) {},
|
| + setNoteTakingAppsUpdatedCallback(callback) {}
|
|
|
| /**
|
| * Open up the play store with the given URL.
|
| * @param {string} url
|
| */
|
| - showPlayStore: function(url) {},
|
| + showPlayStore(url) {}
|
|
|
| /**
|
| * Request current note-taking app info. Invokes any callback registered in
|
| * |onNoteTakingAppsUpdated|.
|
| */
|
| - requestNoteTakingApps: function() {},
|
| + requestNoteTakingApps() {}
|
|
|
| /**
|
| * Changes the preferred note taking app.
|
| * @param {string} appId The app id. This should be a value retrieved from a
|
| * |onNoteTakingAppsUpdated| callback.
|
| */
|
| - setPreferredNoteTakingApp: function(appId) {},
|
| - };
|
| + setPreferredNoteTakingApp(appId) {}
|
| + }
|
|
|
| /**
|
| - * @constructor
|
| * @implements {settings.DevicePageBrowserProxy}
|
| */
|
| - function DevicePageBrowserProxyImpl() {}
|
| - cr.addSingletonGetter(DevicePageBrowserProxyImpl);
|
| -
|
| - DevicePageBrowserProxyImpl.prototype = {
|
| + class DevicePageBrowserProxyImpl {
|
| /** @override */
|
| - initializePointers: function() {
|
| + initializePointers() {
|
| chrome.send('initializePointerSettings');
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - initializeStylus: function() {
|
| + initializeStylus() {
|
| chrome.send('initializeStylusSettings');
|
| - },
|
| + }
|
|
|
| /** override */
|
| - handleLinkEvent: function(e) {
|
| + handleLinkEvent(e) {
|
| // Prevent the link from activating its parent element when tapped or
|
| // when Enter is pressed.
|
| if (e.type != 'keydown' || e.keyCode == 13)
|
| e.stopPropagation();
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - initializeKeyboard: function() {
|
| + initializeKeyboard() {
|
| chrome.send('initializeKeyboardSettings');
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - showKeyboardShortcutsOverlay: function() {
|
| + showKeyboardShortcutsOverlay() {
|
| chrome.send('showKeyboardShortcutsOverlay');
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - updatePowerStatus: function() {
|
| + updatePowerStatus() {
|
| chrome.send('updatePowerStatus');
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - setPowerSource: function(powerSourceId) {
|
| + setPowerSource(powerSourceId) {
|
| chrome.send('setPowerSource', [powerSourceId]);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - requestPowerManagementSettings: function() {
|
| + requestPowerManagementSettings() {
|
| chrome.send('requestPowerManagementSettings');
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - setIdleBehavior: function(behavior) {
|
| + setIdleBehavior(behavior) {
|
| chrome.send('setIdleBehavior', [behavior]);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - setLidClosedBehavior: function(behavior) {
|
| + setLidClosedBehavior(behavior) {
|
| chrome.send('setLidClosedBehavior', [behavior]);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - setNoteTakingAppsUpdatedCallback: function(callback) {
|
| + setNoteTakingAppsUpdatedCallback(callback) {
|
| cr.addWebUIListener('onNoteTakingAppsUpdated', callback);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - showPlayStore: function(url) {
|
| + showPlayStore(url) {
|
| chrome.send('showPlayStoreApps', [url]);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - requestNoteTakingApps: function() {
|
| + requestNoteTakingApps() {
|
| chrome.send('requestNoteTakingApps');
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - setPreferredNoteTakingApp: function(appId) {
|
| + setPreferredNoteTakingApp(appId) {
|
| chrome.send('setPreferredNoteTakingApp', [appId]);
|
| - },
|
| - };
|
| + }
|
| + }
|
| +
|
| + cr.addSingletonGetter(DevicePageBrowserProxyImpl);
|
|
|
| return {
|
| DevicePageBrowserProxy: DevicePageBrowserProxy,
|
|
|