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

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

Issue 265393005: Implement apps v2 custom window frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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 | « remoting/webapp/event_handlers.js ('k') | remoting/webapp/html/template_main.html » ('j') | 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 * Full-screen implementation for apps v2, using chrome.AppWindow. 7 * Full-screen implementation for apps v2, using chrome.AppWindow.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 remoting.FullscreenAppsV2.prototype.syncWithMaximize = function(sync) { 95 remoting.FullscreenAppsV2.prototype.syncWithMaximize = function(sync) {
96 if (sync && chrome.app.window.current().isMaximized()) { 96 if (sync && chrome.app.window.current().isMaximized()) {
97 this.activate(true); 97 this.activate(true);
98 } 98 }
99 this.hookingWindowEvents_ = sync; 99 this.hookingWindowEvents_ = sync;
100 }; 100 };
101 101
102 remoting.FullscreenAppsV2.prototype.onFullscreened_ = function() { 102 remoting.FullscreenAppsV2.prototype.onFullscreened_ = function() {
103 this.notifyCallbacksOnRestore_ = true; 103 this.notifyCallbacksOnRestore_ = true;
104 this.eventSource_.raiseEvent(this.kEventName_, true); 104 this.eventSource_.raiseEvent(this.kEventName_, true);
105 document.body.classList.add('fullscreen');
105 }; 106 };
106 107
107 remoting.FullscreenAppsV2.prototype.onMaximized_ = function() { 108 remoting.FullscreenAppsV2.prototype.onMaximized_ = function() {
108 if (this.hookingWindowEvents_) { 109 if (this.hookingWindowEvents_) {
109 this.activate(true); 110 this.activate(true);
110 } 111 }
111 }; 112 };
112 113
113 remoting.FullscreenAppsV2.prototype.onRestored_ = function() { 114 remoting.FullscreenAppsV2.prototype.onRestored_ = function() {
115 document.body.classList.remove('fullscreen');
114 if (this.hookingWindowEvents_) { 116 if (this.hookingWindowEvents_) {
115 this.activate(false); 117 this.activate(false);
116 } 118 }
117 if (this.notifyCallbacksOnRestore_) { 119 if (this.notifyCallbacksOnRestore_) {
118 this.notifyCallbacksOnRestore_ = false; 120 this.notifyCallbacksOnRestore_ = false;
119 this.eventSource_.raiseEvent(this.kEventName_, false); 121 this.eventSource_.raiseEvent(this.kEventName_, false);
120 } 122 }
121 }; 123 };
OLDNEW
« no previous file with comments | « remoting/webapp/event_handlers.js ('k') | remoting/webapp/html/template_main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698