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

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

Issue 9572024: [Chromoting] Get extension name directly from translation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 'use strict'; 5 'use strict';
6 6
7 /** @suppress {duplicate} */ 7 /** @suppress {duplicate} */
8 var remoting = remoting || {}; 8 var remoting = remoting || {};
9 9
10 /** @type {remoting.HostSession} */ remoting.hostSession = null; 10 /** @type {remoting.HostSession} */ remoting.hostSession = null;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 * The extension manifest is loaded and parsed to extract this info. 82 * The extension manifest is loaded and parsed to extract this info.
83 */ 83 */
84 remoting.logExtensionInfoAsync_ = function() { 84 remoting.logExtensionInfoAsync_ = function() {
85 /** @type {XMLHttpRequest} */ 85 /** @type {XMLHttpRequest} */
86 var xhr = new XMLHttpRequest(); 86 var xhr = new XMLHttpRequest();
87 xhr.open('GET', 'manifest.json'); 87 xhr.open('GET', 'manifest.json');
88 xhr.onload = function(e) { 88 xhr.onload = function(e) {
89 var manifest = 89 var manifest =
90 /** @type {{name: string, version: string, default_locale: string}} */ 90 /** @type {{name: string, version: string, default_locale: string}} */
91 JSON.parse(xhr.responseText); 91 JSON.parse(xhr.responseText);
92 console.log(manifest.name + ' version: ' + manifest.version); 92 var name = chrome.i18n.getMessage('PRODUCT_NAME');
93 console.log(name + ' version: ' + manifest.version);
93 } 94 }
94 xhr.send(null); 95 xhr.send(null);
95 }; 96 };
96 97
97 /** 98 /**
98 * If the client is connected, or the host is shared, prompt before closing. 99 * If the client is connected, or the host is shared, prompt before closing.
99 * 100 *
100 * @return {?string} The prompt string if a connection is active. 101 * @return {?string} The prompt string if a connection is active.
101 */ 102 */
102 remoting.promptClose = function() { 103 remoting.promptClose = function() {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 187
187 /** 188 /**
188 * Returns whether Host mode is supported on this platform. 189 * Returns whether Host mode is supported on this platform.
189 * 190 *
190 * @return {boolean} True if Host mode is supported. 191 * @return {boolean} True if Host mode is supported.
191 */ 192 */
192 function isHostModeSupported_() { 193 function isHostModeSupported_() {
193 // Currently, sharing on Chromebooks is not supported. 194 // Currently, sharing on Chromebooks is not supported.
194 return !navigator.userAgent.match(/\bCrOS\b/); 195 return !navigator.userAgent.match(/\bCrOS\b/);
195 } 196 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698