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

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

Issue 594503004: Move ownership of the tool-bar's menu buttons into remoting.Toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove MenuButton changes (will follow up with a better fix. 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/webapp/client_session.js ('k') | remoting/webapp/remoting.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 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
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
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;
OLDNEW
« no previous file with comments | « remoting/webapp/client_session.js ('k') | remoting/webapp/remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698