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.
6 var kNewWindowId = 'new-window';
8 function createWindow() {
9 chrome.app.window.create('main.html', {
16 /** @param {OnClickData} info */
17 function onContextMenu(info) {
18 if (info.menuItemId == kNewWindowId) {
23 function initializeContextMenu() {
24 chrome.contextMenus.create({
26 contexts: ['launcher'],
27 title: chrome.i18n.getMessage(/*i18n-content*/'NEW_WINDOW')
31 chrome.app.runtime.onLaunched.addListener(createWindow);
32 chrome.contextMenus.onClicked.addListener(onContextMenu);
33 initializeContextMenu();