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

Side by Side Diff: chrome/browser/resources/settings/device_page/device_page_browser_proxy.js

Issue 2644713002: cros: Use runtime stylus detection for ash palette. (Closed)
Patch Set: Fix test 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** @fileoverview A helper object used for testing the Device page. */ 5 /** @fileoverview A helper object used for testing the Device page. */
6 cr.exportPath('settings'); 6 cr.exportPath('settings');
7 7
8 /** 8 /**
9 * Mirrors DeviceType from ash/common/system/chromeos/power/power_status.h. 9 * Mirrors DeviceType from ash/common/system/chromeos/power/power_status.h.
10 * @enum {number} 10 * @enum {number}
(...skipping 28 matching lines...) Expand all
39 settings.NoteAppInfo; 39 settings.NoteAppInfo;
40 40
41 cr.define('settings', function() { 41 cr.define('settings', function() {
42 /** @interface */ 42 /** @interface */
43 function DevicePageBrowserProxy() {} 43 function DevicePageBrowserProxy() {}
44 44
45 DevicePageBrowserProxy.prototype = { 45 DevicePageBrowserProxy.prototype = {
46 /** Initializes the mouse and touchpad handler. */ 46 /** Initializes the mouse and touchpad handler. */
47 initializePointers: function() {}, 47 initializePointers: function() {},
48 48
49 /** Initializes the stylus handler. */
50 initializeStylus: function() {},
51
49 /** 52 /**
50 * Override to interact with the on-tap/on-keydown event on the Learn More 53 * Override to interact with the on-tap/on-keydown event on the Learn More
51 * link. 54 * link.
52 * @param {!Event} e 55 * @param {!Event} e
53 */ 56 */
54 handleLinkEvent: function(e) {}, 57 handleLinkEvent: function(e) {},
55 58
56 /** Initializes the keyboard WebUI handler. */ 59 /** Initializes the keyboard WebUI handler. */
57 initializeKeyboard: function() {}, 60 initializeKeyboard: function() {},
58 61
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 */ 99 */
97 function DevicePageBrowserProxyImpl() {} 100 function DevicePageBrowserProxyImpl() {}
98 cr.addSingletonGetter(DevicePageBrowserProxyImpl); 101 cr.addSingletonGetter(DevicePageBrowserProxyImpl);
99 102
100 DevicePageBrowserProxyImpl.prototype = { 103 DevicePageBrowserProxyImpl.prototype = {
101 /** @override */ 104 /** @override */
102 initializePointers: function() { 105 initializePointers: function() {
103 chrome.send('initializePointerSettings'); 106 chrome.send('initializePointerSettings');
104 }, 107 },
105 108
109 /** @override */
110 initializeStylus: function() {
111 chrome.send('initializeStylusSettings');
112 },
113
106 /** override */ 114 /** override */
107 handleLinkEvent: function(e) { 115 handleLinkEvent: function(e) {
108 // Prevent the link from activating its parent element when tapped or 116 // Prevent the link from activating its parent element when tapped or
109 // when Enter is pressed. 117 // when Enter is pressed.
110 if (e.type != 'keydown' || e.keyCode == 13) 118 if (e.type != 'keydown' || e.keyCode == 13)
111 e.stopPropagation(); 119 e.stopPropagation();
112 }, 120 },
113 121
114 /** @override */ 122 /** @override */
115 initializeKeyboard: function() { 123 initializeKeyboard: function() {
(...skipping 29 matching lines...) Expand all
145 setPreferredNoteTakingApp: function(appId) { 153 setPreferredNoteTakingApp: function(appId) {
146 chrome.send('setPreferredNoteTakingApp', [appId]); 154 chrome.send('setPreferredNoteTakingApp', [appId]);
147 }, 155 },
148 }; 156 };
149 157
150 return { 158 return {
151 DevicePageBrowserProxy: DevicePageBrowserProxy, 159 DevicePageBrowserProxy: DevicePageBrowserProxy,
152 DevicePageBrowserProxyImpl: DevicePageBrowserProxyImpl, 160 DevicePageBrowserProxyImpl: DevicePageBrowserProxyImpl,
153 }; 161 };
154 }); 162 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/device_page/device_page.js ('k') | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698