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

Unified Diff: remoting/webapp/me2mom/ui_mode.js

Issue 9148043: Rename webapp_it2me to remoting_webapp and move it from webapp/me2mom to webapp/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add webapp_it2me back Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/me2mom/toolbar.js ('k') | remoting/webapp/me2mom/util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/me2mom/ui_mode.js
diff --git a/remoting/webapp/me2mom/ui_mode.js b/remoting/webapp/me2mom/ui_mode.js
deleted file mode 100644
index da0253cfa0c9978471d702f82c9be44003021e45..0000000000000000000000000000000000000000
--- a/remoting/webapp/me2mom/ui_mode.js
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/**
- * @fileoverview
- * Functions related to controlling the modal ui state of the app.
- */
-
-'use strict';
-
-/** @suppress {duplicate} */
-var remoting = remoting || {};
-
-/** @enum {string} */
-remoting.AppMode = {
- HOME: 'home',
- UNAUTHENTICATED: 'auth',
- CLIENT: 'client',
- CLIENT_UNCONNECTED: 'client.unconnected',
- CLIENT_PIN_PROMPT: 'client.pin-prompt',
- CLIENT_CONNECTING: 'client.connecting',
- CLIENT_CONNECT_FAILED_IT2ME: 'client.connect-failed.it2me',
- CLIENT_CONNECT_FAILED_ME2ME: 'client.connect-failed.me2me',
- CLIENT_SESSION_FINISHED_IT2ME: 'client.session-finished.it2me',
- CLIENT_SESSION_FINISHED_ME2ME: 'client.session-finished.me2me',
- HOST: 'host',
- HOST_WAITING_FOR_CODE: 'host.waiting-for-code',
- HOST_WAITING_FOR_CONNECTION: 'host.waiting-for-connection',
- HOST_SHARED: 'host.shared',
- HOST_SHARE_FAILED: 'host.share-failed',
- HOST_SHARE_FINISHED: 'host.share-finished',
- IN_SESSION: 'in-session'
-};
-
-/**
- * @type {remoting.AppMode} The current app mode
- */
-remoting.currentMode = remoting.AppMode.HOME;
-
-/**
- * Change the app's modal state to |mode|, which is considered to be a dotted
- * hierachy of modes. For example, setMode('host.shared') will show any modal
- * elements with an data-ui-mode attribute of 'host' or 'host.shared' and hide
- * all others.
- *
- * @param {remoting.AppMode} mode The new modal state, expressed as a dotted
- * hiearchy.
- */
-remoting.setMode = function(mode) {
- var modes = mode.split('.');
- for (var i = 1; i < modes.length; ++i)
- modes[i] = modes[i - 1] + '.' + modes[i];
- var elements = document.querySelectorAll('[data-ui-mode]');
- for (var i = 0; i < elements.length; ++i) {
- var element = /** @type {Element} */ elements[i];
- var hidden = true;
- for (var m = 0; m < modes.length; ++m) {
- if (hasClass(element.getAttribute('data-ui-mode'), modes[m])) {
- hidden = false;
- break;
- }
- }
- element.hidden = hidden;
- }
- remoting.debug.log('App mode: ' + mode);
- remoting.currentMode = mode;
- if (mode == remoting.AppMode.IN_SESSION) {
- document.removeEventListener('keydown', remoting.DebugLog.onKeydown, false);
- } else {
- document.addEventListener('keydown', remoting.DebugLog.onKeydown, false);
- }
- if (mode == remoting.AppMode.HOME) {
- var display = function() { remoting.hostList.display(); };
- remoting.hostList.refresh(display);
- }
-};
-
-/**
- * Get the major mode that the app is running in.
- * @return {string} The app's current major mode.
- */
-remoting.getMajorMode = function() {
- return remoting.currentMode.split('.')[0];
-};
« no previous file with comments | « remoting/webapp/me2mom/toolbar.js ('k') | remoting/webapp/me2mom/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698