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

Side by Side Diff: chrome/browser/resources/extensions/extensions.js

Issue 831063002: Close embedded extension options page when the overlay is hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <include src="../uber/uber_utils.js"> 5 <include src="../uber/uber_utils.js">
6 <include src="extension_code.js"> 6 <include src="extension_code.js">
7 <include src="extension_commands_overlay.js"> 7 <include src="extension_commands_overlay.js">
8 <include src="extension_error_overlay.js"> 8 <include src="extension_error_overlay.js">
9 <include src="extension_focus_manager.js"> 9 <include src="extension_focus_manager.js">
10 <include src="extension_list.js"> 10 <include src="extension_list.js">
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 var pageDiv = $('extension-settings'); 397 var pageDiv = $('extension-settings');
398 if (node) { 398 if (node) {
399 pageDiv.style.width = window.getComputedStyle(pageDiv).width; 399 pageDiv.style.width = window.getComputedStyle(pageDiv).width;
400 document.body.classList.add('no-scroll'); 400 document.body.classList.add('no-scroll');
401 } else { 401 } else {
402 document.body.classList.remove('no-scroll'); 402 document.body.classList.remove('no-scroll');
403 pageDiv.style.width = ''; 403 pageDiv.style.width = '';
404 } 404 }
405 405
406 var currentlyShowingOverlay = ExtensionSettings.getCurrentOverlay(); 406 var currentlyShowingOverlay = ExtensionSettings.getCurrentOverlay();
407 if (currentlyShowingOverlay) 407 if (currentlyShowingOverlay) {
408 currentlyShowingOverlay.classList.remove('showing'); 408 currentlyShowingOverlay.classList.remove('showing');
409 cr.dispatchSimpleEvent($('overlay'), 'cancelOverlay');
Finnur 2015/01/05 10:07:26 The bug states that the overlay erroneously closes
robwu 2015/01/05 10:14:29 Oops, wrong bug number. It is crbug.com/445978.
410 }
409 411
410 if (node) 412 if (node)
411 node.classList.add('showing'); 413 node.classList.add('showing');
412 414
413 var pages = document.querySelectorAll('.page'); 415 var pages = document.querySelectorAll('.page');
414 for (var i = 0; i < pages.length; i++) { 416 for (var i = 0; i < pages.length; i++) {
415 pages[i].setAttribute('aria-hidden', node ? 'true' : 'false'); 417 pages[i].setAttribute('aria-hidden', node ? 'true' : 'false');
416 } 418 }
417 419
418 $('overlay').hidden = !node; 420 $('overlay').hidden = !node;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 457
456 // Export 458 // Export
457 return { 459 return {
458 ExtensionSettings: ExtensionSettings 460 ExtensionSettings: ExtensionSettings
459 }; 461 };
460 }); 462 });
461 463
462 window.addEventListener('load', function(e) { 464 window.addEventListener('load', function(e) {
463 extensions.ExtensionSettings.getInstance().initialize(); 465 extensions.ExtensionSettings.getInstance().initialize();
464 }); 466 });
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