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

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

Issue 803653004: Update Chromoting to use /third_party/closure_compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused types 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 unified diff | Download patch
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 }; 69 };
70 70
71 remoting.FullscreenAppsV2.prototype.toggle = function() { 71 remoting.FullscreenAppsV2.prototype.toggle = function() {
72 this.activate(!this.isActive()); 72 this.activate(!this.isActive());
73 }; 73 };
74 74
75 remoting.FullscreenAppsV2.prototype.isActive = function() { 75 remoting.FullscreenAppsV2.prototype.isActive = function() {
76 return chrome.app.window.current().isFullscreen(); 76 return chrome.app.window.current().isFullscreen();
77 }; 77 };
78 78
79 /**
80 * @param {function(boolean=):void} callback
81 */
79 remoting.FullscreenAppsV2.prototype.addListener = function(callback) { 82 remoting.FullscreenAppsV2.prototype.addListener = function(callback) {
80 this.eventSource_.addEventListener(this.kEventName_, callback); 83 this.eventSource_.addEventListener(this.kEventName_, callback);
81 }; 84 };
82 85
86 /**
87 * @param {function(boolean=):void} callback
88 */
83 remoting.FullscreenAppsV2.prototype.removeListener = function(callback) { 89 remoting.FullscreenAppsV2.prototype.removeListener = function(callback) {
84 this.eventSource_.removeEventListener(this.kEventName_, callback); 90 this.eventSource_.removeEventListener(this.kEventName_, callback);
85 }; 91 };
86 92
87 remoting.FullscreenAppsV2.prototype.onFullscreened_ = function() { 93 remoting.FullscreenAppsV2.prototype.onFullscreened_ = function() {
88 this.notifyCallbacksOnRestore_ = true; 94 this.notifyCallbacksOnRestore_ = true;
89 this.eventSource_.raiseEvent(this.kEventName_, true); 95 this.eventSource_.raiseEvent(this.kEventName_, true);
90 document.body.classList.add('fullscreen'); 96 document.body.classList.add('fullscreen');
91 }; 97 };
92 98
93 remoting.FullscreenAppsV2.prototype.onRestored_ = function() { 99 remoting.FullscreenAppsV2.prototype.onRestored_ = function() {
94 document.body.classList.remove('fullscreen'); 100 document.body.classList.remove('fullscreen');
95 if (this.notifyCallbacksOnRestore_) { 101 if (this.notifyCallbacksOnRestore_) {
96 this.notifyCallbacksOnRestore_ = false; 102 this.notifyCallbacksOnRestore_ = false;
97 this.eventSource_.raiseEvent(this.kEventName_, false); 103 this.eventSource_.raiseEvent(this.kEventName_, false);
98 } 104 }
99 }; 105 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698