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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * Class handling creation and teardown of a remoting client session. | 7 * Class handling creation and teardown of a remoting client session. |
8 * | 8 * |
9 * The ClientSession class controls lifetime of the client plugin | 9 * The ClientSession class controls lifetime of the client plugin |
10 * object and provides the plugin with the functionality it needs to | 10 * object and provides the plugin with the functionality it needs to |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 document.createElement('embed'); | 315 document.createElement('embed'); |
316 | 316 |
317 plugin.id = id; | 317 plugin.id = id; |
318 plugin.src = 'about://none'; | 318 plugin.src = 'about://none'; |
319 plugin.type = 'application/vnd.chromium.remoting-viewer'; | 319 plugin.type = 'application/vnd.chromium.remoting-viewer'; |
320 plugin.width = 0; | 320 plugin.width = 0; |
321 plugin.height = 0; | 321 plugin.height = 0; |
322 plugin.tabIndex = 0; // Required, otherwise focus() doesn't work. | 322 plugin.tabIndex = 0; // Required, otherwise focus() doesn't work. |
323 container.appendChild(plugin); | 323 container.appendChild(plugin); |
324 | 324 |
325 return new remoting.ClientPluginAsync(plugin); | 325 return new remoting.ClientPlugin(plugin); |
326 }; | 326 }; |
327 | 327 |
328 /** | 328 /** |
329 * Callback function called when the plugin element gets focus. | 329 * Callback function called when the plugin element gets focus. |
330 */ | 330 */ |
331 remoting.ClientSession.prototype.pluginGotFocus_ = function() { | 331 remoting.ClientSession.prototype.pluginGotFocus_ = function() { |
332 remoting.clipboard.initiateToHost(); | 332 remoting.clipboard.initiateToHost(); |
333 }; | 333 }; |
334 | 334 |
335 /** | 335 /** |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 * Sends a clipboard item to the host. | 1312 * Sends a clipboard item to the host. |
1313 * | 1313 * |
1314 * @param {string} mimeType The MIME type of the clipboard item. | 1314 * @param {string} mimeType The MIME type of the clipboard item. |
1315 * @param {string} item The clipboard item. | 1315 * @param {string} item The clipboard item. |
1316 */ | 1316 */ |
1317 remoting.ClientSession.prototype.sendClipboardItem = function(mimeType, item) { | 1317 remoting.ClientSession.prototype.sendClipboardItem = function(mimeType, item) { |
1318 if (!this.plugin_) | 1318 if (!this.plugin_) |
1319 return; | 1319 return; |
1320 this.plugin_.sendClipboardItem(mimeType, item) | 1320 this.plugin_.sendClipboardItem(mimeType, item) |
1321 }; | 1321 }; |
OLD | NEW |