OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 chrome.app.runtime.onLaunched.addListener(function() { |
| 6 chrome.app.window.create('main.html', {}, function(win) { |
| 7 chrome.test.sendMessage('Launched', function(reply) { |
| 8 switch (reply) { |
| 9 case 'window': |
| 10 win.fullscreen(); |
| 11 break; |
| 12 case 'dom': |
| 13 win.contentWindow.document.addEventListener('keydown', function() { |
| 14 win.contentWindow.document.removeEventListener('keydown', |
| 15 arguments.callee); |
| 16 win.contentWindow.document.body.webkitRequestFullscreen(); |
| 17 }); |
| 18 break; |
| 19 } |
| 20 }); |
| 21 }); |
| 22 }); |
OLD | NEW |