Show the window controls for 3s on entering full-screen mode.

This addresses some discoverability concerns. LMK if you think it's sufficient.

Review URL: https://codereview.chromium.org/418543002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285617 0039d316-1c4b-4281-b951-d872f2087c98
parent 52272d9c
......@@ -170,8 +170,9 @@ body.fullscreen .window-controls-hover-target {
}
body.fullscreen .window-controls-hover-target:hover,
body.fullscreen .window-controls-hover-target.menu-opened,
body.fullscreen .window-controls-hover-target.opened,
body.fullscreen .window-controls-hover-target.menu-opened {
body.fullscreen .window-controls-hover-target.preview {
top: -4px;
opacity: 1.0;
box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
......
......@@ -97,6 +97,8 @@ remoting.WindowFrame = function(titleBar) {
this.updateMaximizeOrRestoreIconTitle_.bind(this));
chrome.app.window.current().onFullscreened.addListener(
this.updateMaximizeOrRestoreIconTitle_.bind(this));
chrome.app.window.current().onFullscreened.addListener(
this.showWindowControlsPreview_.bind(this));
};
/**
......@@ -225,6 +227,24 @@ remoting.WindowFrame.prototype.onHideOptionsMenu_ = function() {
this.hoverTarget_.classList.remove('menu-opened');
};
/**
* Show the window controls for a few seconds
*
* @private
*/
remoting.WindowFrame.prototype.showWindowControlsPreview_ = function() {
/**
* @type {HTMLElement}
*/
var target = this.hoverTarget_;
var kPreviewTimeoutMs = 3000;
var hidePreview = function() {
target.classList.remove('preview');
};
target.classList.add('preview');
window.setTimeout(hidePreview, kPreviewTimeoutMs);
};
/** @type {remoting.WindowFrame} */
remoting.windowFrame = null;
\ No newline at end of file
remoting.windowFrame = null;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment