OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 var WALLPAPER_PICKER_WIDTH = 550; |
| 6 var WALLPAPER_PICKER_HEIGHT = 420; |
| 7 |
| 8 var wallpaperPickerWindow; |
| 9 |
| 10 chrome.app.runtime.onLaunched.addListener(function() { |
| 11 if (wallpaperPickerWindow && !wallpaperPickerWindow.contentWindow.closed) { |
| 12 wallpaperPickerWindow.focus(); |
| 13 return; |
| 14 } |
| 15 |
| 16 chrome.app.window.create('main.html', { |
| 17 frame: 'chrome', |
| 18 width: WALLPAPER_PICKER_WIDTH, |
| 19 height: WALLPAPER_PICKER_HEIGHT |
| 20 }, function(w) { wallpaperPickerWindow = w; }); |
| 21 }); |
OLD | NEW |