Ignore non-active fullscreen windows for shelf state.
[chromium-blink-merge.git] / remoting / webapp / background.js
blob118b7e578809ff8f4d94bfaa87e7c015c82b4e88
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.
5 /** @type {string} */
6 var kNewWindowId = 'new-window';
8 function createWindow() {
9 chrome.app.window.create('main.html', {
10 'width': 800,
11 'height': 600
12 });
15 /** @param {OnClickData} info */
16 function onContextMenu(info) {
17 if (info.menuItemId == kNewWindowId) {
18 createWindow();
22 function initializeContextMenu() {
23 chrome.contextMenus.create({
24 id: kNewWindowId,
25 contexts: ['launcher'],
26 title: chrome.i18n.getMessage(/*i18n-content*/'NEW_WINDOW')
27 });
30 chrome.app.runtime.onLaunched.addListener(createWindow);
31 chrome.contextMenus.onClicked.addListener(onContextMenu);
32 initializeContextMenu();