Index: chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js |
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..26a07fabb8330346db0b8bb1344e9e9dee250879 |
--- /dev/null |
+++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js |
@@ -0,0 +1,27 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+var WALLPAPER_PICKER_WIDTH = 550; |
+var WALLPAPER_PICKER_HEIGHT = 420; |
+ |
+var wallpaperPickerWindow; |
+ |
+chrome.app.runtime.onLaunched.addListener(function() { |
+ if (wallpaperPickerWindow && !wallpaperPickerWindow.contentWindow.closed) { |
+ wallpaperPickerWindow.focus(); |
flackr
2012/11/12 22:00:34
This may be a legitimate case for minimizing the o
bshe
2012/11/12 23:53:38
I remember we had a double minimizing issue when w
flackr
2012/11/13 02:19:07
We may want to change chrome.wallpaperPrivate.mini
bshe
2012/11/13 15:24:46
Done. PTAL at the latest patchset.
On 2012/11/13
|
+ return; |
+ } |
+ |
+ chrome.app.window.create('main.html', { |
+ frame: 'chrome', |
+ width: WALLPAPER_PICKER_WIDTH, |
+ height: WALLPAPER_PICKER_HEIGHT |
+ }, function(w) { |
+ wallpaperPickerWindow = w; |
+ chrome.wallpaperPrivate.minimizeInactiveWindows(); |
+ w.onClosed.addListener(function() { |
+ chrome.wallpaperPrivate.restoreMinimizedWindows(); |
+ }); |
+ }); |
+}); |