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

Side by Side Diff: remoting/webapp/background.js

Issue 450383003: Hangout remote desktop part II - background.html and AppLauncher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address 2nd round feedbacks Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/background/app_launcher.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 /** @type {string} */
6 var kNewWindowId = 'new-window';
7
8 function createWindow() {
9 chrome.app.window.create('main.html', {
10 'width': 800,
11 'height': 600,
12 'frame': 'none'
13 });
14 };
15
16 /** @param {OnClickData} info */
17 function onContextMenu(info) {
18 if (info.menuItemId == kNewWindowId) {
19 createWindow();
20 }
21 };
22
23 function initializeContextMenu() {
24 chrome.contextMenus.create({
25 id: kNewWindowId,
26 contexts: ['launcher'],
27 title: chrome.i18n.getMessage(/*i18n-content*/'NEW_WINDOW')
28 });
29 }
30
31 chrome.app.runtime.onLaunched.addListener(createWindow);
32 chrome.contextMenus.onClicked.addListener(onContextMenu);
33 initializeContextMenu();
OLDNEW
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/background/app_launcher.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698