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

Side by Side Diff: chrome/browser/resources/chromeos/arc_support/background.js

Issue 2545793003: Do not show "Just a sec" page if arc-loading page is shown. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * Chrome window that hosts UI. Only one window is allowed. 6 * Chrome window that hosts UI. Only one window is allowed.
7 * @type {chrome.app.window.AppWindow} 7 * @type {chrome.app.window.AppWindow}
8 */ 8 */
9 var appWindow = null; 9 var appWindow = null;
10 10
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 * 'none' hides all views. 480 * 'none' hides all views.
481 * @param {string} pageDivId id of divider of the page to show. 481 * @param {string} pageDivId id of divider of the page to show.
482 */ 482 */
483 function showPage(pageDivId) { 483 function showPage(pageDivId) {
484 if (!appWindow) { 484 if (!appWindow) {
485 return; 485 return;
486 } 486 }
487 487
488 hideOverlay(); 488 hideOverlay();
489 var doc = appWindow.contentWindow.document; 489 var doc = appWindow.contentWindow.document;
490 var pages = doc.getElementsByClassName('section'); 490 // If the request is lso-loading and arc-loading page is currently shown,
491 for (var i = 0; i < pages.length; i++) { 491 // then we do not switch the view. This is because both pages are saying
492 pages[i].hidden = pages[i].id != pageDivId; 492 // "operation in progress", and switching the page looks unwanted message
493 // change from users' point of view.
494 if (pageDivId != 'lso-loading' || doc.getElementById('arc-loading').hidden) {
495 var pages = doc.getElementsByClassName('section');
496 for (var i = 0; i < pages.length; i++) {
497 pages[i].hidden = pages[i].id != pageDivId;
498 }
493 } 499 }
494 500
495 if (pageDivId == 'lso-loading') { 501 if (pageDivId == 'lso-loading') {
496 lsoView.src = 'https://accounts.google.com/o/oauth2/v2/auth?client_id=' + 502 lsoView.src = 'https://accounts.google.com/o/oauth2/v2/auth?client_id=' +
497 '1070009224336-sdh77n7uot3oc99ais00jmuft6sk2fg9.apps.' + 503 '1070009224336-sdh77n7uot3oc99ais00jmuft6sk2fg9.apps.' +
498 'googleusercontent.com&response_type=code&redirect_uri=oob&' + 504 'googleusercontent.com&response_type=code&redirect_uri=oob&' +
499 'scope=https://www.google.com/accounts/OAuthLogin&' + 505 'scope=https://www.google.com/accounts/OAuthLogin&' +
500 'device_type=arc_plus_plus&device_id=' + currentDeviceId + 506 'device_type=arc_plus_plus&device_id=' + currentDeviceId +
501 '&hl=' + navigator.language; 507 '&hl=' + navigator.language;
502 } 508 }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 type: 'chrome', 745 type: 'chrome',
740 color: '#ffffff' 746 color: '#ffffff'
741 }, 747 },
742 'innerBounds': { 748 'innerBounds': {
743 'width': INNER_WIDTH, 749 'width': INNER_WIDTH,
744 'height': INNER_HEIGHT 750 'height': INNER_HEIGHT
745 } 751 }
746 }; 752 };
747 chrome.app.window.create('main.html', options, onWindowCreated); 753 chrome.app.window.create('main.html', options, onWindowCreated);
748 }); 754 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698