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

Unified Diff: remoting/webapp/me2mom/event_handlers.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/dividertop.png ('k') | remoting/webapp/me2mom/host_list.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/me2mom/event_handlers.js
diff --git a/remoting/webapp/me2mom/event_handlers.js b/remoting/webapp/me2mom/event_handlers.js
deleted file mode 100644
index bafb58ede96b36be48685a218646c249c3948e5b..0000000000000000000000000000000000000000
--- a/remoting/webapp/me2mom/event_handlers.js
+++ /dev/null
@@ -1,69 +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.
-
-'use strict';
-
-/** @suppress {duplicate} */
-var remoting = remoting || {};
-
-function onLoad() {
- var goHome = function() {
- remoting.setMode(remoting.AppMode.HOME);
- };
- var goClient = function() {
- remoting.setMode(remoting.AppMode.CLIENT_UNCONNECTED);
- };
- /** @param {Event} event */
- var sendAccessCode = function(event) {
- remoting.connectIt2Me();
- event.preventDefault();
- };
- /** @param {Event} event */
- var connectHostWithPin = function(event) {
- remoting.connectMe2MeWithPin();
- event.preventDefault();
- };
- var doAuthRedirect = function() {
- remoting.oauth2.doAuthRedirect();
- }
- /** @type {Array.<{event: string, id: string, fn: function(Event):void}>} */
- var actions = [
- { event: 'click', id: 'clear-oauth', fn: remoting.clearOAuth2 },
- { event: 'click', id: 'toolbar-disconnect', fn: remoting.disconnect },
- { event: 'click', id: 'toggle-scaling', fn: remoting.toggleScaleToFit },
- { event: 'click', id: 'auth-button', fn: doAuthRedirect },
- { event: 'click', id: 'share-button', fn: remoting.tryShare },
- { event: 'click', id: 'access-mode-button', fn: goClient },
- { event: 'click', id: 'cancel-share-button', fn: remoting.cancelShare },
- { event: 'click', id: 'host-finished-button', fn: goHome },
- { event: 'click', id: 'client-cancel-button', fn: goHome },
- { event: 'click', id: 'client-finished-button', fn: goClient },
- { event: 'click', id: 'cancel-button',
- fn: remoting.cancelPendingOperation },
- { event: 'submit', id: 'access-code-form', fn: sendAccessCode },
- { event: 'submit', id: 'pin-form', fn: connectHostWithPin }
- ];
-
- for (var i = 0; i < actions.length; ++i) {
- var action = actions[i];
- var element = document.getElementById(action.id);
- if (element) {
- element.addEventListener(action.event, action.fn, false);
- } else {
- console.error('Could not set ' + action.id +
- ' event handler on element ' + action.event +
- ': element not found.');
- }
- }
- remoting.init();
-}
-
-function onBeforeUnload() {
- return remoting.promptClose();
-}
-
-window.addEventListener('load', onLoad, false);
-window.addEventListener('beforeunload', onBeforeUnload, false);
-window.addEventListener('resize', remoting.onResize, false);
-window.addEventListener('unload', remoting.disconnect, false);
« no previous file with comments | « remoting/webapp/me2mom/dividertop.png ('k') | remoting/webapp/me2mom/host_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698