OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |