1 diff --git a/remoting/webapp/event_handlers.js b/remoting/webapp/event_handlers.js
2 index 5dfc368..f69d984 100644
3 --- a/event_handlers.js
4 +++ b/event_handlers.js
5 @@ -54,7 +54,6 @@ function onLoad() {
6 fn: remoting.sendCtrlAltDel },
7 { event: 'click', id: 'send-print-screen',
8 fn: remoting.sendPrintScreen },
9 - { event: 'click', id: 'auth-button', fn: doAuthRedirect },
10 { event: 'click', id: 'share-button', fn: remoting.tryShare },
11 { event: 'click', id: 'access-mode-button', fn: goEnterAccessCode },
12 { event: 'click', id: 'cancel-share-button', fn: remoting.cancelShare },
13 @@ -104,6 +103,4 @@ function onBeforeUnload() {
16 window.addEventListener('load', onLoad, false);
17 -window.addEventListener('beforeunload', onBeforeUnload, false);
18 window.addEventListener('resize', remoting.onResize, false);
19 -window.addEventListener('unload', remoting.disconnect, false);
20 diff --git a/remoting/webapp/host_controller.js b/remoting/webapp/host_controller.js
21 index 83c9844..98f63c3 100644
22 --- a/host_controller.js
23 +++ b/host_controller.js
24 @@ -356,7 +356,7 @@ remoting.HostController.prototype.getLocalHostStateAndId = function(onDone) {
28 - this.plugin_.getDaemonConfig(onConfig);
33 diff --git a/remoting/webapp/main.html b/remoting/webapp/main.html
34 index 061caeb..f61e532 100644
37 @@ -35,6 +35,7 @@ found in the LICENSE file.
38 <script src="host_settings.js"></script>
39 <script src="host_setup_dialog.js"></script>
40 <script src="host_table_entry.js"></script>
41 + <script src="identity.js"></script>
42 <script src="l10n.js"></script>
43 <script src="log_to_server.js"></script>
44 <script src="menu_button.js"></script>
45 diff --git a/remoting/webapp/manifest.json b/remoting/webapp/manifest.json
46 index 5be9243..39052b9 100644
50 "manifest_version": 2,
51 "default_locale": "en",
54 - "local_path": "main.html"
56 + "scripts": ["background.js"]
59 + "key": "chromotingappsv2",
61 "128": "chromoting128.webp",
62 "48": "chromoting48.webp",
63 "16": "chromoting16.webp"
65 - "content_scripts": [
68 - "OAUTH2_REDIRECT_URL"
70 - "js": [ "cs_oauth2_trampoline.js" ]
73 - "content_security_policy": "default-src 'self'; script-src 'self' TALK_GADGET_HOST; style-src 'self' https://fonts.googleapis.com; img-src 'self' TALK_GADGET_HOST; font-src *; connect-src 'self' OAUTH2_ACCOUNTS_HOST GOOGLE_API_HOSTS TALK_GADGET_HOST https://relay.google.com",
75 "OAUTH2_ACCOUNTS_HOST/*",
76 "OAUTH2_API_BASE_URL/*",
78 "TALK_GADGET_HOST/talkgadget/*",
79 "https://relay.google.com/*",
85 - { "path": "remoting_host_plugin.dll", "public": false },
86 - { "path": "libremoting_host_plugin.ia32.so", "public": false },
87 - { "path": "libremoting_host_plugin.x64.so", "public": false },
88 - { "path": "remoting_host_plugin.plugin", "public": false }
93 + "client_id": "45833509441.apps.googleusercontent.com",
95 + "https://www.googleapis.com/auth/chromoting https://www.googleapis.com/auth/googletalk https://www.googleapis.com/auth/userinfo#email"
104 + "pages": [ "wcs_sandbox.html" ]
107 diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js
108 index f89072a..2fadd83 100644
111 @@ -34,8 +34,6 @@ function consentRequired_(authContinue) {
112 * Entry point for app initialization.
114 remoting.init = function() {
115 - migrateLocalToChromeStorage_();
117 // TODO(jamiewalch): Remove this when we migrate to apps v2
118 // (http://crbug.com/ 134213).
119 remoting.initMockStorage();
120 @@ -45,10 +45,7 @@ remoting.init = function() {
121 // Create global objects.
122 remoting.settings = new remoting.Settings();
123 remoting.oauth2 = new remoting.OAuth2();
124 - // TODO(jamiewalch): Reinstate this when we migrate to apps v2
125 - // (http://crbug.com/ 134213).
126 - // remoting.identity = new remoting.Identity(consentRequired_);
127 - remoting.identity = remoting.oauth2;
128 + remoting.identity = new remoting.Identity(consentRequired_);
129 remoting.stats = new remoting.ConnectionStats(
130 document.getElementById('statistics'));
131 remoting.formatIq = new remoting.FormatIq();
132 @@ -133,9 +130,6 @@ remoting.initHomeScreenUi = function () {
133 document.getElementById('share-button').disabled =
134 !remoting.hostController.isPluginSupported();
135 remoting.setMode(remoting.AppMode.HOME);
136 - if (!remoting.oauth2.isAuthenticated()) {
137 - document.getElementById('auth-dialog').hidden = false;
139 remoting.hostSetupDialog =
140 new remoting.HostSetupDialog(remoting.hostController);
141 // Display the cached host list, then asynchronously update and re-display it.
142 diff --git a/remoting/webapp/xhr_proxy.js b/remoting/webapp/xhr_proxy.js
143 index 4c45780..653b481 100644
146 @@ -90,4 +90,4 @@ remoting.XMLHttpRequestProxy.prototype.DONE = 4;
148 // Since the WCS driver code constructs XHRs directly, the only mechanism for
149 // proxying them is to replace the XMLHttpRequest constructor.
150 -//XMLHttpRequest = remoting.XMLHttpRequestProxy;
151 +XMLHttpRequest = remoting.XMLHttpRequestProxy;