summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-06 01:03:56 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-06 01:03:56 +0000
commit037c7aec32be66da9994c36ee0fb11c2f127ef48 (patch)
tree0ab347a7c53a8b291ff2f1c0efb63864be199159 /chrome/browser
parentdb2b8076a01c36dd30dd457ec01a66d16d6e92aa (diff)
downloadchromium_src-037c7aec32be66da9994c36ee0fb11c2f127ef48.zip
chromium_src-037c7aec32be66da9994c36ee0fb11c2f127ef48.tar.gz
chromium_src-037c7aec32be66da9994c36ee0fb11c2f127ef48.tar.bz2
DOMUI: hide the OTR exceptions when the incognito profile is destroyed.
BUG=57437 TEST=close the last incognito window while OTR exceptions are showing, they should disappear Review URL: http://codereview.chromium.org/4552006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/resources/options/content_settings.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/resources/options/content_settings.js b/chrome/browser/resources/options/content_settings.js
index 4225597..1a0c89b 100644
--- a/chrome/browser/resources/options/content_settings.js
+++ b/chrome/browser/resources/options/content_settings.js
@@ -130,7 +130,6 @@ cr.define('options', function() {
var parentExceptionsArea =
document.querySelector('div[contentType=' + type + '][mode=normal]');
if (!parentExceptionsArea.classList.contains('hidden')) {
- exceptionsArea.classList.remove('hidden');
exceptionsArea.querySelector('list').redraw();
}
};
@@ -139,12 +138,18 @@ cr.define('options', function() {
* Clears and hides the incognito exceptions lists.
*/
ContentSettings.OTRProfileDestroyed = function() {
+ // Find all zippies, set them to hide OTR profiles, and remeasure them
+ // to make them smoothly animate to the new size.
+ var zippies = document.querySelectorAll('.zippy');
+ for (var i = 0; i < zippies.length; i++) {
+ zippies[i].classList.remove('show-otr');
+ zippies[i].remeasure();
+ }
+
var exceptionsAreas =
document.querySelectorAll('div[contentType][mode=otr]');
-
for (var i = 0; i < exceptionsAreas.length; i++) {
exceptionsAreas[i].otrProfileExists = false;
- exceptionsAreas[i].classList.add('hidden');
exceptionsAreas[i].querySelector('list').clear();
}
};