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

Unified Diff: remoting/webapp/crd/js/app_launcher.js

Issue 875583002: Allow full-screen mode when not connected, and remember the previous setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: remoting/webapp/crd/js/app_launcher.js
diff --git a/remoting/webapp/crd/js/app_launcher.js b/remoting/webapp/crd/js/app_launcher.js
index 29589dfc45f6f8d9ba358d02e4d37b5a6cf75be5..ed93d449f0e3fa077117ed57a2ada03caaa640f6 100644
--- a/remoting/webapp/crd/js/app_launcher.js
+++ b/remoting/webapp/crd/js/app_launcher.js
@@ -105,20 +105,27 @@ remoting.V2AppLauncher.prototype.launch = function(opt_launchArgs) {
* @param {function(*=):void} reject
*/
return new Promise(function(resolve, reject) {
- chrome.app.window.create(url, {
- 'width': 800,
- 'height': 600,
- 'frame': 'none',
- 'id': String(remoting.V2AppLauncher.nextWindowId_++)
- },
- /** @param {AppWindow=} appWindow */
- function(appWindow) {
- if (!appWindow) {
- reject(new Error(chrome.runtime.lastError.message));
- } else {
- resolve(appWindow.id);
- }
- });
+ var START_FULLSCREEN = 'start-fullscreen';
+ /** @param {Object} values */
+ var onValues = function(values) {
+ /** @type {string} */
+ var state = values[START_FULLSCREEN] ? 'fullscreen' : 'normal';
Jamie 2015/01/23 22:37:24 As discussed, this currently doesn't work due to c
kelvinp 2015/01/23 23:39:58 Should we wait for the apps team before making thi
Jamie 2015/01/24 00:46:35 I decided to go ahead and implement the workaround
+ chrome.app.window.create(url, {
+ 'width': 800, 'height': 600,
+ 'frame': 'none',
+ 'id': String(remoting.V2AppLauncher.nextWindowId_++),
+ 'state': state
+ },
+ /** @param {AppWindow=} appWindow */
+ function(appWindow) {
+ if (!appWindow) {
+ reject(new Error(chrome.runtime.lastError.message));
+ } else {
+ resolve(appWindow.id);
+ }
+ });
+ };
+ chrome.storage.local.get(START_FULLSCREEN, onValues);
});
};

Powered by Google App Engine
This is Rietveld 408576698