OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // TODO(jamiewalch): strict mode causes the page to crash so it's disabled for |
| 6 // now. Reinstate this when the associated bug is fixed. |
| 7 // http://code.google.com/p/v8/issues/detail?id=1423 |
| 8 //"use strict"; |
6 | 9 |
7 // TODO(ajwong): This seems like a bad idea to share the exact same object | 10 // TODO(ajwong): This seems like a bad idea to share the exact same object |
8 // with the background page. Why are we doing it like this? | 11 // with the background page. Why are we doing it like this? |
9 var remoting = chrome.extension.getBackgroundPage().remoting; | 12 var remoting = chrome.extension.getBackgroundPage().remoting; |
10 remoting.CLIENT_MODE='client'; | 13 remoting.CLIENT_MODE='client'; |
11 remoting.HOST_MODE='host'; | 14 remoting.HOST_MODE='host'; |
12 remoting.PLUGIN_MIMETYPE='HOST_PLUGIN_MIMETYPE'; | 15 remoting.PLUGIN_MIMETYPE='HOST_PLUGIN_MIMETYPE'; |
13 remoting.XMPP_LOGIN_NAME = 'xmpp_login'; | 16 remoting.XMPP_LOGIN_NAME = 'xmpp_login'; |
14 remoting.HOST_PLUGIN_ID = 'host-plugin-id'; | 17 remoting.HOST_PLUGIN_ID = 'host-plugin-id'; |
15 | 18 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 } else { | 293 } else { |
291 setClientMode('connecting'); | 294 setClientMode('connecting'); |
292 resolveSupportId(parts[0]); | 295 resolveSupportId(parts[0]); |
293 } | 296 } |
294 } | 297 } |
295 | 298 |
296 function cancelConnect() { | 299 function cancelConnect() { |
297 remoting.accessCode = ''; | 300 remoting.accessCode = ''; |
298 setClientMode('unconnected'); | 301 setClientMode('unconnected'); |
299 } | 302 } |
OLD | NEW |