Index: remoting/webapp/window_frame.js |
diff --git a/remoting/webapp/window_frame.js b/remoting/webapp/window_frame.js |
index 7c6a75706482f478acd2ea968a32fd20378ee809..6aa32b03e193309aa73136f8378132182db93cbe 100644 |
--- a/remoting/webapp/window_frame.js |
+++ b/remoting/webapp/window_frame.js |
@@ -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; |
+remoting.windowFrame = null; |