OLD | NEW |
(Empty) | |
| 1 diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp |
| 2 index 2f7a7f0..57d1a57 100644 |
| 3 --- a/remoting/remoting.gyp |
| 4 +++ b/remoting/remoting.gyp |
| 5 @@ -154,6 +154,7 @@ |
| 6 'webapp/toolbar.css', |
| 7 ], |
| 8 'remoting_webapp_js_files': [ |
| 9 + 'webapp/background.js', |
| 10 'webapp/client_plugin.js', |
| 11 'webapp/client_plugin_async.js', |
| 12 'webapp/client_screen.js', |
| 13 @@ -170,6 +171,7 @@ |
| 14 'webapp/host_session.js', |
| 15 'webapp/host_setup_dialog.js', |
| 16 'webapp/host_table_entry.js', |
| 17 + 'webapp/identity.js', |
| 18 'webapp/l10n.js', |
| 19 'webapp/log_to_server.js', |
| 20 'webapp/menu_button.js', |
| 21 diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.
js |
| 22 index 5659a77..fd727d1 100644 |
| 23 --- a/remoting/webapp/client_session.js |
| 24 +++ b/remoting/webapp/client_session.js |
| 25 @@ -206,7 +206,7 @@ remoting.ClientSession.prototype.createClientPlugin_ = funct
ion(container, id) { |
| 26 document.createElement('embed'); |
| 27 |
| 28 plugin.id = id; |
| 29 - plugin.src = 'about://none'; |
| 30 + plugin.src = ''; |
| 31 plugin.type = 'application/vnd.chromium.remoting-viewer'; |
| 32 plugin.width = 0; |
| 33 plugin.height = 0; |
| 34 diff --git b/remoting/webapp/event_handlers.js a/remoting/webapp/event_handlers.
js |
| 35 index f3a8c24..63cd14c 100644 |
| 36 --- a/remoting/webapp/event_handlers.js |
| 37 +++ b/remoting/webapp/event_handlers.js |
| 38 @@ -62,7 +62,6 @@ function onLoad() { |
| 39 fn: remoting.sendCtrlAltDel }, |
| 40 { event: 'click', id: 'send-print-screen', |
| 41 fn: remoting.sendPrintScreen }, |
| 42 - { event: 'click', id: 'auth-button', fn: doAuthRedirect }, |
| 43 { event: 'click', id: 'share-button', fn: remoting.tryShare }, |
| 44 { event: 'click', id: 'access-mode-button', fn: goEnterAccessCode }, |
| 45 { event: 'click', id: 'cancel-share-button', fn: remoting.cancelShare }, |
| 46 @@ -124,6 +123,6 @@ function onBeforeUnload() { |
| 47 } |
| 48 |
| 49 window.addEventListener('load', onLoad, false); |
| 50 -window.addEventListener('beforeunload', onBeforeUnload, false); |
| 51 +//window.addEventListener('beforeunload', onBeforeUnload, false); |
| 52 window.addEventListener('resize', remoting.onResize, false); |
| 53 -window.addEventListener('unload', remoting.disconnect, false); |
| 54 +//window.addEventListener('unload', remoting.disconnect, false); |
| 55 diff --git b/remoting/webapp/host_controller.js a/remoting/webapp/host_controlle
r.js |
| 56 index 5f04bce..517696d 100644 |
| 57 --- b/remoting/webapp/host_controller.js |
| 58 +++ a/remoting/webapp/host_controller.js |
| 59 @@ -310,7 +310,7 @@ remoting.HostController.prototype.getLocalHostStateAndId = f
unction(onDone) { |
| 60 onDone(state, that.localHostId_); |
| 61 }; |
| 62 try { |
| 63 - this.plugin_.getDaemonConfig(onConfig); |
| 64 + onConfig('{}'); // this.plugin_.getDaemonConfig(onConfig); |
| 65 } catch (err) { |
| 66 onDone(remoting.HostController.State.NOT_IMPLEMENTED, null); |
| 67 } |
| 68 diff --git b/remoting/webapp/identity.js a/remoting/webapp/identity.js |
| 69 index 3734bc6..30b85a3 100644 |
| 70 --- b/remoting/webapp/identity.js |
| 71 +++ a/remoting/webapp/identity.js |
| 72 @@ -12,12 +12,7 @@ |
| 73 /** @suppress {duplicate} */ |
| 74 var remoting = remoting || {}; |
| 75 |
| 76 -/** |
| 77 - * TODO(jamiewalch): Remove the remoting.OAuth2 possibility when the Apps v2 |
| 78 - * work is complete. |
| 79 - * |
| 80 - * @type {remoting.Identity|remoting.OAuth2} |
| 81 - */ |
| 82 +/** @type {remoting.Identity} */ |
| 83 remoting.identity = null; |
| 84 |
| 85 |
| 86 --- a/remoting/webapp/manifest.json |
| 87 +++ b/remoting/webapp/manifest.json |
| 88 @@ -2,28 +2,22 @@ |
| 89 "name": "__MSG_PRODUCT_NAME__", |
| 90 "version": "FULL_APP_VERSION", |
| 91 "description": "__MSG_PRODUCT_DESCRIPTION__", |
| 92 - "manifest_version": 2, |
| 93 "default_locale": "en", |
| 94 - "app": { |
| 95 - "launch": { |
| 96 - "local_path": "main.html" |
| 97 + "manifest_version": 2, |
| 98 + "app" : { |
| 99 + "background": { |
| 100 + "scripts": ["background.js"] |
| 101 } |
| 102 }, |
| 103 + "key": "chromotingappsv2", |
| 104 "icons": { |
| 105 "128": "chromoting128.png", |
| 106 "48": "chromoting48.png", |
| 107 "16": "chromoting16.png" |
| 108 }, |
| 109 - "content_scripts": [ |
| 110 - { |
| 111 - "matches": [ |
| 112 - "OAUTH2_REDIRECT_URL" |
| 113 - ], |
| 114 - "js": [ "cs_oauth2_trampoline.js" ] |
| 115 - } |
| 116 - ], |
| 117 - "content_security_policy": "default-src 'self'; script-src 'self' https://*.t
alkgadget.google.com; style-src 'self' https://fonts.googleapis.com; img-src 'se
lf' https://*.talkgadget.google.com; font-src *; connect-src 'self' https://acco
unts.google.com https://www.googleapis.com https://*.talkgadget.google.com https
://relay.google.com", |
| 118 "permissions": [ |
| 119 + "experimental", |
| 120 + "storage", |
| 121 "https://accounts.google.com/*", |
| 122 "https://www.googleapis.com/chromoting/*", |
| 123 "https://*.talkgadget.google.com/talkgadget/*", |
| 124 @@ -31,12 +25,12 @@ |
| 125 "clipboardRead", |
| 126 "clipboardWrite" |
| 127 ], |
| 128 - "plugins": [ |
| 129 - { "path": "remoting_host_plugin.dll", "public": false }, |
| 130 - { "path": "libremoting_host_plugin.ia32.so", "public": false }, |
| 131 - { "path": "libremoting_host_plugin.x64.so", "public": false }, |
| 132 - { "path": "remoting_host_plugin.plugin", "public": false } |
| 133 - ], |
| 134 + "oauth2": { |
| 135 + "client_id": "45833509441.apps.googleusercontent.com", |
| 136 + "scopes": [ |
| 137 + "https://www.googleapis.com/auth/chromoting https://www.googleapis.com/au
th/googletalk https://www.googleapis.com/auth/userinfo#email" |
| 138 + ] |
| 139 + }, |
| 140 "requirements": { |
| 141 "plugins": { |
| 142 "npapi": false |
| 143 diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js |
| 144 index a8ab35b..9c6df35 100644 |
| 145 --- a/remoting/webapp/remoting.js |
| 146 +++ b/remoting/webapp/remoting.js |
| 147 @@ -39,11 +47,9 @@ remoting.init = function() { |
| 148 l10n.localize(); |
| 149 // Create global objects. |
| 150 remoting.oauth2 = new remoting.OAuth2(); |
| 151 - // TODO(jamiewalch): Reinstate this when we migrate to apps v2. |
| 152 - // remoting.identity = new remoting.Identity( |
| 153 - // document.getElementById('auth-dialog'), |
| 154 - // document.getElementById('auth-button')); |
| 155 - remoting.identity = remoting.oauth2; |
| 156 + remoting.identity = new remoting.Identity( |
| 157 + document.getElementById('auth-dialog'), |
| 158 + document.getElementById('auth-button')); |
| 159 remoting.stats = new remoting.ConnectionStats( |
| 160 document.getElementById('statistics')); |
| 161 remoting.formatIq = new remoting.FormatIq(); |
| 162 @@ -119,9 +126,6 @@ remoting.initDaemonUi = function () { |
| 163 document.getElementById('share-button').disabled = |
| 164 !remoting.hostController.isPluginSupported(); |
| 165 remoting.setMode(remoting.AppMode.HOME); |
| 166 - if (!remoting.oauth2.isAuthenticated()) { |
| 167 - document.getElementById('auth-dialog').hidden = false; |
| 168 - } |
| 169 remoting.hostSetupDialog = |
| 170 new remoting.HostSetupDialog(remoting.hostController); |
| 171 // Display the cached host list, then asynchronously update and re-display it
. |
| 172 diff --git b/remoting/webapp/main.html a/remoting/webapp/main.html |
| 173 index 1a45c86..113403a 100644 |
| 174 --- b/remoting/webapp/main.html |
| 175 +++ a/remoting/webapp/main.html |
| 176 @@ -31,6 +31,7 @@ found in the LICENSE file. |
| 177 <script src="host_screen.js"></script> |
| 178 <script src="host_session.js"></script> |
| 179 <script src="host_table_entry.js"></script> |
| 180 + <script src="identity.js"></script> |
| 181 <script src="l10n.js"></script> |
| 182 <script src="log_to_server.js"></script> |
| 183 <script src="menu_button.js"></script> |
OLD | NEW |