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

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

Issue 491873004: Add an explicit full-screen button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webapp_move_context_menu
Patch Set: Rebase. Created 6 years, 3 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
« no previous file with comments | « remoting/resources/icon_fullscreen.webp ('k') | remoting/webapp/fullscreen.js » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * Class handling creation and teardown of a remoting client session. 7 * Class handling creation and teardown of a remoting client session.
8 * 8 *
9 * The ClientSession class controls lifetime of the client plugin 9 * The ClientSession class controls lifetime of the client plugin
10 * object and provides the plugin with the functionality it needs to 10 * object and provides the plugin with the functionality it needs to
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 this.plugin_.cleanup(); 584 this.plugin_.cleanup();
585 this.plugin_ = null; 585 this.plugin_ = null;
586 } 586 }
587 587
588 // Delete event handlers that aren't relevent when not connected. 588 // Delete event handlers that aren't relevent when not connected.
589 this.fullScreenButton_.removeEventListener( 589 this.fullScreenButton_.removeEventListener(
590 'click', this.callToggleFullScreen_, false); 590 'click', this.callToggleFullScreen_, false);
591 591
592 // Leave full-screen mode, and stop listening for related events. 592 // Leave full-screen mode, and stop listening for related events.
593 var listener = this.callOnFullScreenChanged_; 593 var listener = this.callOnFullScreenChanged_;
594 remoting.fullscreen.syncWithMaximize(false);
595 remoting.fullscreen.activate( 594 remoting.fullscreen.activate(
596 false, 595 false,
597 function() { 596 function() {
598 remoting.fullscreen.removeListener(listener); 597 remoting.fullscreen.removeListener(listener);
599 }); 598 });
600 if (remoting.windowFrame) { 599 if (remoting.windowFrame) {
601 remoting.windowFrame.setClientSession(null); 600 remoting.windowFrame.setClientSession(null);
602 } else { 601 } else {
603 remoting.toolbar.setClientSession(null); 602 remoting.toolbar.setClientSession(null);
604 } 603 }
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 this.setFocusHandlers_(); 976 this.setFocusHandlers_();
978 this.onDesktopSizeChanged_(); 977 this.onDesktopSizeChanged_();
979 if (this.resizeToClient_) { 978 if (this.resizeToClient_) {
980 var clientArea = this.getClientArea_(); 979 var clientArea = this.getClientArea_();
981 this.plugin_.notifyClientResolution(clientArea.width, 980 this.plugin_.notifyClientResolution(clientArea.width,
982 clientArea.height, 981 clientArea.height,
983 window.devicePixelRatio); 982 window.devicePixelRatio);
984 } 983 }
985 // Activate full-screen related UX. 984 // Activate full-screen related UX.
986 remoting.fullscreen.addListener(this.callOnFullScreenChanged_); 985 remoting.fullscreen.addListener(this.callOnFullScreenChanged_);
987 remoting.fullscreen.syncWithMaximize(true);
988 if (remoting.windowFrame) { 986 if (remoting.windowFrame) {
989 remoting.windowFrame.setClientSession(this); 987 remoting.windowFrame.setClientSession(this);
990 } else { 988 } else {
991 remoting.toolbar.setClientSession(this); 989 remoting.toolbar.setClientSession(this);
992 } 990 }
993 document.body.classList.add('connected'); 991 document.body.classList.add('connected');
994 992
995 this.container_.addEventListener('mousemove', 993 this.container_.addEventListener('mousemove',
996 this.updateMouseCursorPosition_, 994 this.updateMouseCursorPosition_,
997 true); 995 true);
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 * @param {string} data Contents of the extension message. 1635 * @param {string} data Contents of the extension message.
1638 * @return {boolean} True if the message was recognized, false otherwise. 1636 * @return {boolean} True if the message was recognized, false otherwise.
1639 */ 1637 */
1640 remoting.ClientSession.prototype.handleExtensionMessage = 1638 remoting.ClientSession.prototype.handleExtensionMessage =
1641 function(type, data) { 1639 function(type, data) {
1642 if (this.videoFrameRecorder_) { 1640 if (this.videoFrameRecorder_) {
1643 return this.videoFrameRecorder_.handleMessage(type, data); 1641 return this.videoFrameRecorder_.handleMessage(type, data);
1644 } 1642 }
1645 return false; 1643 return false;
1646 } 1644 }
OLDNEW
« no previous file with comments | « remoting/resources/icon_fullscreen.webp ('k') | remoting/webapp/fullscreen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698