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

Side by Side Diff: remoting/webapp/app_remoting/js/window_activation_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 to update the application's context menu to include host-side windows 7 * Class to update the application's context menu to include host-side windows
8 * and to notify the host when one of these menu items is selected. 8 * and to notify the host when one of these menu items is selected.
9 */ 9 */
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 * @return {string} 59 * @return {string}
60 * @private 60 * @private
61 */ 61 */
62 remoting.WindowActivationMenu.prototype.makeMenuId_ = function(windowId) { 62 remoting.WindowActivationMenu.prototype.makeMenuId_ = function(windowId) {
63 return 'window-' + windowId; 63 return 'window-' + windowId;
64 }; 64 };
65 65
66 /** 66 /**
67 * Handle a click on the application's context menu. 67 * Handle a click on the application's context menu.
68 * 68 *
69 * @param {OnClickData} info 69 * @param {OnClickData=} info
70 * @private 70 * @private
71 */ 71 */
72 remoting.WindowActivationMenu.prototype.onContextMenu_ = function(info) { 72 remoting.WindowActivationMenu.prototype.onContextMenu_ = function(info) {
73 /** @type {Array.<string>} */ 73 /** @type {Array.<string>} */
74 var components = info.menuItemId.split('-'); 74 var components = info.menuItemId.split('-');
75 if (components.length == 2 && 75 if (components.length == 2 &&
76 this.makeMenuId_(parseInt(components[1], 10)) == info.menuItemId) { 76 this.makeMenuId_(parseInt(components[1], 10)) == info.menuItemId) {
77 remoting.clientSession.sendClientMessage( 77 remoting.clientSession.sendClientMessage(
78 'activateWindow', 78 'activateWindow',
79 JSON.stringify({ id: parseInt(components[1], 0) })); 79 JSON.stringify({ id: parseInt(components[1], 0) }));
80 if (chrome.app.window.current().isMinimized()) { 80 if (chrome.app.window.current().isMinimized()) {
81 chrome.app.window.current().restore(); 81 chrome.app.window.current().restore();
82 } 82 }
83 } 83 }
84 }; 84 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698