OLD | NEW |
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 * Class handling the in-session options menu (or menus in the case of apps v1). | 7 * Class handling the in-session options menu (or menus in the case of apps v1). |
8 */ | 8 */ |
9 | 9 |
10 'use strict'; | 10 'use strict'; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 /** | 62 /** |
63 * @param {remoting.ClientSession} clientSession The active session, or null if | 63 * @param {remoting.ClientSession} clientSession The active session, or null if |
64 * there is no connection. | 64 * there is no connection. |
65 */ | 65 */ |
66 remoting.OptionsMenu.prototype.setClientSession = function(clientSession) { | 66 remoting.OptionsMenu.prototype.setClientSession = function(clientSession) { |
67 this.clientSession_ = clientSession; | 67 this.clientSession_ = clientSession; |
68 }; | 68 }; |
69 | 69 |
70 remoting.OptionsMenu.prototype.onShow = function() { | 70 remoting.OptionsMenu.prototype.onShow = function() { |
71 if (this.clientSession_) { | 71 if (this.clientSession_) { |
| 72 this.resizeToClient_.hidden = |
| 73 this.clientSession_.getMode() == remoting.ClientSession.Mode.IT2ME; |
72 remoting.MenuButton.select( | 74 remoting.MenuButton.select( |
73 this.resizeToClient_, this.clientSession_.getResizeToClient()); | 75 this.resizeToClient_, this.clientSession_.getResizeToClient()); |
74 remoting.MenuButton.select( | 76 remoting.MenuButton.select( |
75 this.shrinkToFit_, this.clientSession_.getShrinkToFit()); | 77 this.shrinkToFit_, this.clientSession_.getShrinkToFit()); |
76 if (this.fullscreen_) { | 78 if (this.fullscreen_) { |
77 remoting.MenuButton.select( | 79 remoting.MenuButton.select( |
78 this.fullscreen_, remoting.fullscreen.isActive()); | 80 this.fullscreen_, remoting.fullscreen.isActive()); |
79 } | 81 } |
80 if (this.startStopRecording_) { | 82 if (this.startStopRecording_) { |
81 this.startStopRecording_.hidden = !this.clientSession_.canRecordVideo(); | 83 this.startStopRecording_.hidden = !this.clientSession_.canRecordVideo(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 128 |
127 remoting.OptionsMenu.prototype.onFullscreen_ = function() { | 129 remoting.OptionsMenu.prototype.onFullscreen_ = function() { |
128 remoting.fullscreen.toggle(); | 130 remoting.fullscreen.toggle(); |
129 }; | 131 }; |
130 | 132 |
131 remoting.OptionsMenu.prototype.onStartStopRecording_ = function() { | 133 remoting.OptionsMenu.prototype.onStartStopRecording_ = function() { |
132 if (this.clientSession_) { | 134 if (this.clientSession_) { |
133 this.clientSession_.startStopRecording(); | 135 this.clientSession_.startStopRecording(); |
134 } | 136 } |
135 } | 137 } |
| 138 |
| 139 /** |
| 140 * @type {remoting.OptionsMenu} |
| 141 */ |
| 142 remoting.optionsMenu = null; |
OLD | NEW |