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

Side by Side Diff: remoting/webapp/app_remoting/js/keyboard_layouts_menu.js

Issue 803653004: Update Chromoting to use /third_party/closure_compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class managing the host's available keyboard layouts, allowing the user to 7 * Class managing the host's available keyboard layouts, allowing the user to
8 * select one that matches the local layout, or auto-selecting based on the 8 * select one that matches the local layout, or auto-selecting based on the
9 * current locale. 9 * current locale.
10 */ 10 */
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 * @return {string} 159 * @return {string}
160 * @private 160 * @private
161 */ 161 */
162 remoting.KeyboardLayoutsMenu.prototype.makeMenuId_ = function(layout) { 162 remoting.KeyboardLayoutsMenu.prototype.makeMenuId_ = function(layout) {
163 return 'layout@' + layout; 163 return 'layout@' + layout;
164 }; 164 };
165 165
166 /** 166 /**
167 * Handle a click on the application's context menu. 167 * Handle a click on the application's context menu.
168 * 168 *
169 * @param {OnClickData} info 169 * @param {OnClickData=} info
170 * @private 170 * @private
171 */ 171 */
172 remoting.KeyboardLayoutsMenu.prototype.onContextMenu_ = function(info) { 172 remoting.KeyboardLayoutsMenu.prototype.onContextMenu_ = function(info) {
173 /** @type {Array.<string>} */ 173 /** @type {Array.<string>} */
174 var components = info.menuItemId.split('@'); 174 var components = info.menuItemId.split('@');
175 if (components.length == 2 && 175 if (components.length == 2 &&
176 this.makeMenuId_(components[1]) == info.menuItemId) { 176 this.makeMenuId_(components[1]) == info.menuItemId) {
177 this.setLayout_(true, components[1]); 177 this.setLayout_(true, components[1]);
178 } 178 }
179 }; 179 };
180 180
181 /** 181 /**
182 * @type {string} 182 * @type {string}
183 * @private 183 * @private
184 */ 184 */
185 remoting.KeyboardLayoutsMenu.KEY_ = 'preferred-keyboard-layout'; 185 remoting.KeyboardLayoutsMenu.KEY_ = 'preferred-keyboard-layout';
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698