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

Unified Diff: remoting/webapp/crd/js/remoting.js

Issue 1070223003: [Webapp Refactor] Remove remoting.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 years, 8 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/crd/js/format_iq.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/remoting.js
diff --git a/remoting/webapp/crd/js/remoting.js b/remoting/webapp/crd/js/remoting.js
deleted file mode 100644
index 5337a66e9a5510aafe67c4f399c7b6af3acc2091..0000000000000000000000000000000000000000
--- a/remoting/webapp/crd/js/remoting.js
+++ /dev/null
@@ -1,83 +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 || {};
-
-/**
- * @type {base.EventSourceImpl} An event source object for handling global
- * events. This is an interim hack. Eventually, we should move
- * functionalities away from the remoting namespace and into smaller objects.
- */
-remoting.testEvents;
-
-/**
- * Initialization tasks that are common to all remoting apps.
- */
-remoting.initGlobalObjects = function() {
- if (base.isAppsV2()) {
- var htmlNode = /** @type {HTMLElement} */ (document.body.parentNode);
- htmlNode.classList.add('apps-v2');
- }
-
- console.log(remoting.getExtensionInfo());
- l10n.localize();
-
- remoting.formatIq = new remoting.FormatIq();
-
- var sandbox =
- /** @type {HTMLIFrameElement} */ (document.getElementById('wcs-sandbox'));
- remoting.wcsSandbox = new remoting.WcsSandboxContainer(sandbox.contentWindow);
-
- remoting.initModalDialogs();
-
- remoting.testEvents = new base.EventSourceImpl();
- /** @enum {string} */
- remoting.testEvents.Names = {
- uiModeChanged: 'uiModeChanged'
- };
- remoting.testEvents.defineEvents(base.values(remoting.testEvents.Names));
-};
-
-/**
- * @return {string} Information about the current extension.
- */
-remoting.getExtensionInfo = function() {
- var v2OrLegacy = base.isAppsV2() ? " (v2)" : " (legacy)";
- var manifest = chrome.runtime.getManifest();
- if (manifest && manifest.version) {
- var name = remoting.app.getApplicationName();
- return name + ' version: ' + manifest.version + v2OrLegacy;
- } else {
- return 'Failed to get product version. Corrupt manifest?';
- }
-};
-
-/**
- * Return the current time as a formatted string suitable for logging.
- *
- * @return {string} The current time, formatted as [mmdd/hhmmss.xyz]
- */
-remoting.timestamp = function() {
- /**
- * @param {number} num A number.
- * @param {number} len The required length of the answer.
- * @return {string} The number, formatted as a string of the specified length
- * by prepending zeroes as necessary.
- */
- var pad = function(num, len) {
- var result = num.toString();
- if (result.length < len) {
- result = new Array(len - result.length + 1).join('0') + result;
- }
- return result;
- };
- var now = new Date();
- var timestamp = pad(now.getMonth() + 1, 2) + pad(now.getDate(), 2) + '/' +
- pad(now.getHours(), 2) + pad(now.getMinutes(), 2) +
- pad(now.getSeconds(), 2) + '.' + pad(now.getMilliseconds(), 3);
- return '[' + timestamp + ']';
-};
« no previous file with comments | « remoting/webapp/crd/js/format_iq.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698