Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: chrome/test/data/extensions/platform_apps/custom_launcher_page/main.js

Issue 1137503005: Add launcherPage.hide() API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mobile Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 function hideCustomLauncherPage() {
35 chrome.launcherPage.hide(function() {
36 chrome.test.sendMessage('launcherPageHidden');
37 });
38 }
39
34 document.addEventListener('DOMContentLoaded', function() { 40 document.addEventListener('DOMContentLoaded', function() {
35 chrome.test.sendMessage('Launched'); 41 chrome.test.sendMessage('Launched');
36 }); 42 });
37 43
38 var textfield = document.getElementById('textfield'); 44 var textfield = document.getElementById('textfield');
39 textfield.onfocus = function() { 45 textfield.onfocus = function() {
40 chrome.test.sendMessage('textfieldFocused'); 46 chrome.test.sendMessage('textfieldFocused');
41 }; 47 };
42 48
43 textfield.onblur = function() { 49 textfield.onblur = function() {
44 chrome.test.sendMessage('textfieldBlurred'); 50 chrome.test.sendMessage('textfieldBlurred');
45 }; 51 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/launcher_page.idl ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698