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

Unified Diff: experimental/webgtt/javascript/webgtt.js

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/webgtt/javascript/vertex.js ('k') | experimental/webgtt/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/webgtt/javascript/webgtt.js
diff --git a/experimental/webgtt/javascript/webgtt.js b/experimental/webgtt/javascript/webgtt.js
deleted file mode 100644
index 37cbee241699c67f966757e081b52d7b85cb8c60..0000000000000000000000000000000000000000
--- a/experimental/webgtt/javascript/webgtt.js
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2011 The Native Client 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 This file contains the top level JavaScript required for the
- * WebGTT application. The two main functions are fired when the page loads and
- * when the NaCl module loads, respectively. We handle these load events
- * separately since the order in which these events are fired is much less
- * predictable than other standard DOM elements (for which we assume that they
- * are loaded when the page is loaded).
- *
- * @author ragad@google.com (Raga Gopalakrishnan)
- */
-
-/**
- * Each of these variables is an object corresponding to a DOM element. Since
- * event handlers for one DOM element may need to modify properties of or
- * perform actions on another DOM element, these objects have global scope.
- */
-var naclModule1 = undefined; // NaClModule object. See naclmodule.js
-var graph1 = new Graph(); // Graph object. See graph.js
-var canvas1 = undefined; // Canvas object. See canvas.js
-var coloringButton1 = undefined; // ColoringButton object. See button.js
-
-/**
- * This constant holds the default status message.
- * @type {string}
- * @const
- */
-STATUS_TEXT = 'NO-STATUS';
-
-/**
- * This function is triggered when the page has finished loading, and contains
- * starter code (initializing objects, etc.).
- *
- * The NaCl module could still be loading while the page has finished loading.
- * So, the status must be updated accordingly, and no NaClModule object is
- * created yet. New objects of the Canvas and ColoringButton classes are
- * created, and the appropriate event handlers are attached.
- */
-function main1 () {
- if (naclModule1 == undefined) {
- updateStatus('LOADING...');
- } else {
- updateStatus();
- }
-
- canvas1 = new Canvas(document.getElementById('mainCanvas'), graph1);
- canvas1.drawingCanvas.addEventListener(
- 'click', function (e) {canvas1.handleCanvasClick(e);}, false);
- window.addEventListener(
- 'keydown', function (e) {canvas1.handleCanvasKeydown(e);}, true);
-
- coloringButton1 = new ColoringButton(document.getElementById('coloring'),
- graph1);
- coloringButton1.coloringButton.addEventListener(
- 'click', function (e) {coloringButton1.handleColoringButtonClick(e);},
- false);
-}
-
-/**
- * This function is triggered when the NaCl module has finished loading. It
- * creates a new NaClModule object, attaches an event handler to it, and
- * indcates to the user that the NaCl module has loaded successfully.
- */
-function main2() {
- naclModule1 = new NaClModule(document.getElementById('webgtt'), graph1);
- naclModule1.naclModule.addEventListener(
- 'message', function (e) {naclModule1.handleMessage(e);}, false);
- updateStatus('SUCCESS');
-}
-
-/**
- * This function sets the global status message.
- *
- * If the element with id 'statusField' exists, then its HTML is set to the
- * status message as well. opt_message is the message text. If this is null or
- * undefined, then the element with id 'statusField' is set to STATUS_TEXT.
- *
- * @param {string} opt_message The status message to be displayed.
- */
-function updateStatus(opt_message) {
- var statusText = STATUS_TEXT;
- if (opt_message) {
- statusText = opt_message;
- }
- var statusField = document.getElementById('status_field');
- if (statusField) {
- statusField.innerHTML = statusText;
- }
-}
« no previous file with comments | « experimental/webgtt/javascript/vertex.js ('k') | experimental/webgtt/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698