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

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

Issue 338373004: Smoother full-screen UX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reinstate double-restore. Created 6 years, 6 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 | « 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Apps v2 custom title bar implementation 7 * Apps v2 custom title bar implementation
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 /** @type {boolean} */ 124 /** @type {boolean} */
125 var restore = 125 var restore =
126 chrome.app.window.current().isFullscreen() || 126 chrome.app.window.current().isFullscreen() ||
127 chrome.app.window.current().isMaximized(); 127 chrome.app.window.current().isMaximized();
128 if (restore) { 128 if (restore) {
129 // Restore twice: once to exit full-screen and once to exit maximized. 129 // Restore twice: once to exit full-screen and once to exit maximized.
130 // If the app is not full-screen, or went full-screen without first 130 // If the app is not full-screen, or went full-screen without first
131 // being maximized, then the second restore has no effect. 131 // being maximized, then the second restore has no effect.
132 chrome.app.window.current().restore(); 132 chrome.app.window.current().restore();
133 chrome.app.window.current().restore(); 133 chrome.app.window.current().restore();
134 } else if (this.isConnected_) {
135 chrome.app.window.current().fullscreen();
134 } else { 136 } else {
135 chrome.app.window.current().maximize(); 137 chrome.app.window.current().maximize();
136 } 138 }
137 }; 139 };
138 140
139 /** 141 /**
140 * @private 142 * @private
141 */ 143 */
142 remoting.WindowFrame.prototype.minimizeWindow_ = function() { 144 remoting.WindowFrame.prototype.minimizeWindow_ = function() {
143 chrome.app.window.current().minimize(); 145 chrome.app.window.current().minimize();
(...skipping 21 matching lines...) Expand all
165 tag = /*i18n-content*/'RESTORE_WINDOW'; 167 tag = /*i18n-content*/'RESTORE_WINDOW';
166 } else if (this.isConnected_) { 168 } else if (this.isConnected_) {
167 tag = /*i18n-content*/'FULL_SCREEN'; 169 tag = /*i18n-content*/'FULL_SCREEN';
168 } else { 170 } else {
169 tag = /*i18n-content*/'MAXIMIZE_WINDOW'; 171 tag = /*i18n-content*/'MAXIMIZE_WINDOW';
170 } 172 }
171 this.maximizeRestoreControl_.title = l10n.getTranslationOrError(tag); 173 this.maximizeRestoreControl_.title = l10n.getTranslationOrError(tag);
172 }; 174 };
173 175
174 /** @type {remoting.WindowFrame} */ 176 /** @type {remoting.WindowFrame} */
175 remoting.windowFrame = null; 177 remoting.windowFrame = null;
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