| OLD | NEW |
| 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 /** | 5 /** |
| 6 * Global wallpaperManager reference useful for poking at from the console. | 6 * Global wallpaperManager reference useful for poking at from the console. |
| 7 */ | 7 */ |
| 8 var wallpaperManager; | 8 var wallpaperManager; |
| 9 | 9 |
| 10 function init() { | 10 function init() { |
| 11 window.addEventListener('load', function() { | |
| 12 chrome.wallpaperPrivate.minimizeInactiveWindows(); }); | |
| 13 window.addEventListener('unload', function() { | |
| 14 chrome.wallpaperPrivate.restoreMinimizedWindows(); }); | |
| 15 WallpaperManager.initStrings(function() { | 11 WallpaperManager.initStrings(function() { |
| 16 wallpaperManager = new WallpaperManager(document.body); | 12 wallpaperManager = new WallpaperManager(document.body); |
| 17 }); | 13 }); |
| 18 } | 14 } |
| 19 | 15 |
| 20 document.addEventListener('DOMContentLoaded', init); | 16 document.addEventListener('DOMContentLoaded', init); |
| OLD | NEW |