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

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

Issue 10951020: Show a helpful error message if a host domain policy blocked an attempt to use (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review. Created 8 years, 3 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 | « remoting/webapp/host_screen.js ('k') | remoting/webapp/remoting.js » ('j') | 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class handling creation and teardown of a remoting host session. 7 * Class handling creation and teardown of a remoting host session.
8 * 8 *
9 * This abstracts a <embed> element and controls the plugin which does the 9 * This abstracts a <embed> element and controls the plugin which does the
10 * actual remoting work. There should be no UI code inside this class. It 10 * actual remoting work. There should be no UI code inside this class. It
(...skipping 18 matching lines...) Expand all
29 // must be kept in sync. 29 // must be kept in sync.
30 /** @enum {number} */ 30 /** @enum {number} */
31 remoting.HostSession.State = { 31 remoting.HostSession.State = {
32 UNKNOWN: -1, 32 UNKNOWN: -1,
33 DISCONNECTED: 0, 33 DISCONNECTED: 0,
34 STARTING: 1, 34 STARTING: 1,
35 REQUESTED_ACCESS_CODE: 2, 35 REQUESTED_ACCESS_CODE: 2,
36 RECEIVED_ACCESS_CODE: 3, 36 RECEIVED_ACCESS_CODE: 3,
37 CONNECTED: 4, 37 CONNECTED: 4,
38 DISCONNECTING: 5, 38 DISCONNECTING: 5,
39 ERROR: 6 39 ERROR: 6,
40 INVALID_DOMAIN_ERROR: 7
40 }; 41 };
41 42
42 /** 43 /**
43 * Create an instance of the host plugin. 44 * Create an instance of the host plugin.
44 * @return {remoting.HostPlugin} The new plugin instance. 45 * @return {remoting.HostPlugin} The new plugin instance.
45 */ 46 */
46 remoting.HostSession.createPlugin = function() { 47 remoting.HostSession.createPlugin = function() {
47 var plugin = document.createElement('embed'); 48 var plugin = document.createElement('embed');
48 plugin.type = remoting.PLUGIN_MIMETYPE; 49 plugin.type = remoting.PLUGIN_MIMETYPE;
49 // Hiding the plugin means it doesn't load, so make it size zero instead. 50 // Hiding the plugin means it doesn't load, so make it size zero instead.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 }; 113 };
113 114
114 115
115 /** 116 /**
116 * Remove the plugin element from the document. 117 * Remove the plugin element from the document.
117 * @return {void} Nothing. 118 * @return {void} Nothing.
118 */ 119 */
119 remoting.HostSession.prototype.removePlugin = function() { 120 remoting.HostSession.prototype.removePlugin = function() {
120 this.plugin.parentNode.removeChild(this.plugin); 121 this.plugin.parentNode.removeChild(this.plugin);
121 }; 122 };
OLDNEW
« no previous file with comments | « remoting/webapp/host_screen.js ('k') | remoting/webapp/remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698