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

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

Issue 2804623004: arc: Restore Chrome badging for apps that have peer in Android apps. (Closed)
Patch Set: update Created 3 years, 8 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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.app.runtime.onLaunched.addListener(function() { 5 chrome.app.runtime.onLaunched.addListener(function() {
6 chrome.test.sendMessage("Launched"); 6 chrome.test.sendMessage("Launched");
7 // Create a panel window first 7 // Create a panel window first
8 chrome.app.window.create( 8 chrome.app.window.create(
9 'main.html', { type: "panel" }, 9 'main.html', { type: "panel" },
10 function (win) { 10 function (win) {
11 // Set the panel window icon 11 // Set the panel window icon
12 win.setIcon("icon64.png") 12 win.setIcon("icon64.png")
13 // Create the shell window; it should use the app icon, and not affect 13 // Create the shell window; it should use the app icon, and not affect
14 // the panel icon. 14 // the panel icon.
15 chrome.app.window.create( 15 chrome.app.window.create(
16 'main.html', { type: "shell" }, 16 'main.html', { type: "shell" },
17 function (win) { 17 function (win) {
18 chrome.test.sendMessage("Completed"); 18 // Create the shell window which is shown in shelf; it should use
19 // another custom app icon.
20 chrome.app.window.create(
21 'main.html', { id: "win_with_icon",
22 type: "shell",
23 icon: "icon48.png",
msw 2017/04/06 19:22:29 q: what's the difference between |win.setIcon("...
khmel 2017/04/06 20:10:40 It is equivalent, can be used after creation. Also
24 showInShelf: true },
25 function (win) {
26 chrome.test.sendMessage("Completed");
27 });
19 }); 28 });
20 }); 29 });
21 }); 30 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698