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

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: Rebase 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
« no previous file with comments | « remoting/webapp/crd/html/window_frame.css ('k') | remoting/webapp/crd/js/client_session.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9257d3dbfd47eee89046d073ce52462174963082 100644
--- a/remoting/webapp/crd/js/app_launcher.js
+++ b/remoting/webapp/crd/js/app_launcher.js
@@ -105,20 +105,28 @@ 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';
+ 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);
});
};
« no previous file with comments | « remoting/webapp/crd/html/window_frame.css ('k') | remoting/webapp/crd/js/client_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698