OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 chrome.launcherPage.onTransitionChanged.addListener(function(progress) { | 5 chrome.launcherPage.onTransitionChanged.addListener(function(progress) { |
6 if (progress == 0) { | 6 if (progress == 0) { |
7 chrome.test.sendMessage('onPageProgressAt0'); | 7 chrome.test.sendMessage('onPageProgressAt0'); |
8 } else if (progress == 1) { | 8 } else if (progress == 1) { |
9 // Push 2 launcher page subpages. | 9 // Push 2 launcher page subpages. |
10 chrome.launcherPage.pushSubpage(function() { | 10 chrome.launcherPage.pushSubpage(function() { |
(...skipping 13 matching lines...) Expand all Loading... |
24 chrome.test.sendMessage('launcherPageDisabled'); | 24 chrome.test.sendMessage('launcherPageDisabled'); |
25 }); | 25 }); |
26 } | 26 } |
27 | 27 |
28 function enableCustomLauncherPage() { | 28 function enableCustomLauncherPage() { |
29 chrome.launcherPage.setEnabled(true, function() { | 29 chrome.launcherPage.setEnabled(true, function() { |
30 chrome.test.sendMessage('launcherPageEnabled'); | 30 chrome.test.sendMessage('launcherPageEnabled'); |
31 }); | 31 }); |
32 } | 32 } |
33 | 33 |
34 chrome.test.sendMessage('Launched'); | 34 document.addEventListener('DOMContentLoaded', function() { |
| 35 chrome.test.sendMessage('Launched'); |
| 36 }); |
| 37 |
| 38 var textfield = document.getElementById('textfield'); |
| 39 textfield.onfocus = function() { |
| 40 chrome.test.sendMessage('textfieldFocused'); |
| 41 }; |
| 42 |
| 43 textfield.onblur = function() { |
| 44 chrome.test.sendMessage('textfieldBlurred'); |
| 45 }; |
OLD | NEW |