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

Side by Side Diff: remoting/webapp/app_remoting/js/ar_background.js

Issue 952823003: Use a framed window on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** @type {AppWindow} */ 5 /** @type {AppWindow} */
6 var mainWindow = null; 6 var mainWindow = null;
7 7
8 /** 8 /**
9 * The main window cannot delete its context menu entries on close because it 9 * The main window cannot delete its context menu entries on close because it
10 * is being torn down at that point and doesn't have access to the necessary 10 * is being torn down at that point and doesn't have access to the necessary
(...skipping 10 matching lines...) Expand all
21 if (mainWindow) { 21 if (mainWindow) {
22 mainWindow.focus(); 22 mainWindow.focus();
23 return; 23 return;
24 } 24 }
25 25
26 var typed_screen = /** @type {{availWidth: number, availHeight: number}} */ 26 var typed_screen = /** @type {{availWidth: number, availHeight: number}} */
27 (screen); 27 (screen);
28 28
29 var windowAttributes = { 29 var windowAttributes = {
30 resizable: false, 30 resizable: false,
31 frame: 'none', 31 frame: remoting.platformIsMac() ? 'chrome' : 'none',
32 bounds: { 32 bounds: {
33 width: typed_screen.availWidth, 33 width: typed_screen.availWidth,
34 height: typed_screen.availHeight 34 height: typed_screen.availHeight
35 } 35 }
36 }; 36 };
37 37
38 function onClosed() { 38 function onClosed() {
39 mainWindow = null; 39 mainWindow = null;
40 var ids = Object.keys(contextMenuIds); 40 var ids = Object.keys(contextMenuIds);
41 for (var i = 0; i < ids.length; ++i) { 41 for (var i = 0; i < ids.length; ++i) {
(...skipping 23 matching lines...) Expand all
65 contextMenuIds[id] = true; 65 contextMenuIds[id] = true;
66 break; 66 break;
67 case 'removeContextMenuId': 67 case 'removeContextMenuId':
68 delete contextMenuIds[id]; 68 delete contextMenuIds[id];
69 break; 69 break;
70 } 70 }
71 }; 71 };
72 72
73 chrome.app.runtime.onLaunched.addListener(createWindow); 73 chrome.app.runtime.onLaunched.addListener(createWindow);
74 window.addEventListener('message', onWindowMessage, false); 74 window.addEventListener('message', onWindowMessage, false);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698