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

Side by Side Diff: remoting/webapp/appsv2.patch

Issue 11875021: Allow an AppsV2 build to be configured using GYP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated patch comment and rebase. Created 7 years, 11 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/remoting.gyp ('k') | remoting/webapp/build-webapp.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git a/remoting/webapp/event_handlers.js b/remoting/webapp/event_handlers. js
2 index 5659a77..fd727d1 100644
3 --- a/event_handlers.js
4 +++ b/event_handlers.js
5 @@ -62,7 +62,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 @@ -124,6 +123,4 @@ function onBeforeUnload() {
14 }
15
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_controlle r.js
21 index 5f04bce..517696d 100644
22 --- a/host_controller.js
23 +++ b/host_controller.js
24 @@ -310,7 +310,7 @@ remoting.HostController.prototype.getLocalHostStateAndId = f unction(onDone) {
25 onDone(state, that.localHostId_);
26 };
27 try {
28 - this.plugin_.getDaemonConfig(onConfig);
29 + onConfig('{}');
30 } catch (err) {
31 onDone(remoting.HostController.State.NOT_IMPLEMENTED, null);
32 }
33 diff --git a/remoting/webapp/host_table_entry.js b/remoting/webapp/host_table_en try.js
34 index 7c7fb11..4255d88 100644
35 --- a/host_table_entry.js
36 +++ b/host_table_entry.js
37 @@ -191,9 +191,7 @@ remoting.HostTableEntry.prototype.updateStatus = function(op t_forEdit) {
38 /** @type {string} */
39 var encodedHostId = encodeURIComponent(this.host.hostId)
40 this.onConnectReference_ = function() {
41 - var hostUrl = chrome.extension.getURL('main.html') +
42 - '?mode=me2me&hostId=' + encodedHostId;
43 - window.location.assign(hostUrl);
44 + remoting.connectMe2Me(encodedHostId, true);
45 };
46 this.tableRow.addEventListener('click', this.onConnectReference_, false);
47 }
48 diff --git a/remoting/webapp/main.html b/remoting/webapp/main.html
49 index 26fa487..d69f54e 100644
50 --- a/main.html
51 +++ b/main.html
52 @@ -31,6 +31,7 @@ found in the LICENSE file.
53 <script src="host_screen.js"></script>
54 <script src="host_session.js"></script>
55 <script src="host_table_entry.js"></script>
56 + <script src="identity.js"></script>
57 <script src="l10n.js"></script>
58 <script src="log_to_server.js"></script>
59 <script src="menu_button.js"></script>
60 diff --git a/remoting/webapp/manifest.json b/remoting/webapp/manifest.json
61 index a52b1da..fdae490 100644
62 --- a/manifest.json
63 +++ b/manifest.json
64 @@ -2,25 +2,19 @@
65 "description": "__MSG_PRODUCT_DESCRIPTION__",
66 "default_locale": "en",
67 - "app": {
68 - "launch": {
69 - "local_path": "main.html"
70 + "app" : {
71 + "background": {
72 + "scripts": ["background.js"]
73 }
74 },
75 + "key": "chromotingappsv2",
76 "icons": {
77 "128": "chromoting128.png",
78 "48": "chromoting48.png",
79 "16": "chromoting16.png"
80 },
81 - "content_scripts": [
82 - {
83 - "matches": [
84 - "OAUTH2_REDIRECT_URL"
85 - ],
86 - "js": [ "cs_oauth2_trampoline.js" ]
87 - }
88 - ],
89 - "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",
90 "permissions": [
91 + "experimental",
92 + "storage",
93 "https://accounts.google.com/*",
94 "https://www.googleapis.com/chromoting/*",
95 "https://*.talkgadget.google.com/talkgadget/*",
96 @@ -31,12 +25,12 @@
97 "clipboardRead",
98 "clipboardWrite"
99 ],
100 - "plugins": [
101 - { "path": "remoting_host_plugin.dll", "public": false },
102 - { "path": "libremoting_host_plugin.ia32.so", "public": false },
103 - { "path": "libremoting_host_plugin.x64.so", "public": false },
104 - { "path": "remoting_host_plugin.plugin", "public": false }
105 - ],
106 + "oauth2": {
107 + "client_id": "45833509441.apps.googleusercontent.com",
108 + "scopes": [
109 + "https://www.googleapis.com/auth/chromoting https://www.googleapis.com/au th/googletalk https://www.googleapis.com/auth/userinfo#email"
110 + ]
111 + },
112 "requirements": {
113 "plugins": {
114 "npapi": false
115 diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js
116 index a8ab35b..9c6df35 100644
117 --- a/remoting.js
118 +++ b/remoting.js
119 @@ -39,10 +47,7 @@ remoting.init = function() {
120 l10n.localize();
121 // Create global objects.
122 remoting.oauth2 = new remoting.OAuth2();
123 - // TODO(jamiewalch): Reinstate this when we migrate to apps v2
124 - // (http://crbug.com/ 134213).
125 - // remoting.identity = new remoting.Identity(consentRequired_);
126 - remoting.identity = remoting.oauth2;
127 + remoting.identity = new remoting.Identity(consentRequired_);
128 remoting.stats = new remoting.ConnectionStats(
129 document.getElementById('statistics'));
130 remoting.formatIq = new remoting.FormatIq();
131 @@ -119,9 +126,6 @@ remoting.initDaemonUi = function () {
132 document.getElementById('share-button').disabled =
133 !remoting.hostController.isPluginSupported();
134 remoting.setMode(remoting.AppMode.HOME);
135 - if (!remoting.oauth2.isAuthenticated()) {
136 - document.getElementById('auth-dialog').hidden = false;
137 - }
138 remoting.hostSetupDialog =
139 new remoting.HostSetupDialog(remoting.hostController);
140 // Display the cached host list, then asynchronously update and re-display it .
OLDNEW
« no previous file with comments | « remoting/remoting.gyp ('k') | remoting/webapp/build-webapp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698