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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/platform/utilities.js

Issue 2611843010: DevTools: move DOMExtension.js into ui module. (Closed)
Patch Set: Introduce progress monitor Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 while (leftIndex < leftKeys.length) { 1433 while (leftIndex < leftKeys.length) {
1434 var leftKey = leftKeys[leftIndex++]; 1434 var leftKey = leftKeys[leftIndex++];
1435 removed.push(this.get(leftKey)); 1435 removed.push(this.get(leftKey));
1436 } 1436 }
1437 while (rightIndex < rightKeys.length) { 1437 while (rightIndex < rightKeys.length) {
1438 var rightKey = rightKeys[rightIndex++]; 1438 var rightKey = rightKeys[rightIndex++];
1439 added.push(other.get(rightKey)); 1439 added.push(other.get(rightKey));
1440 } 1440 }
1441 return {added: added, removed: removed, equal: equal}; 1441 return {added: added, removed: removed, equal: equal};
1442 }; 1442 };
1443
1444 /**
1445 * TODO: move into its own module
1446 * @param {function()} callback
1447 * @suppressGlobalPropertiesCheck
1448 */
1449 function runOnWindowLoad(callback) {
1450 /**
1451 * @suppressGlobalPropertiesCheck
1452 */
1453 function windowLoaded() {
1454 self.removeEventListener('DOMContentLoaded', windowLoaded, false);
1455 callback();
1456 }
1457
1458 if (document.readyState === 'complete' || document.readyState === 'interactive ')
1459 callback();
1460 else
1461 self.addEventListener('DOMContentLoaded', windowLoaded, false);
1462 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698