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

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

Issue 7108007: Add basic debug log to host page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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/remoting_session.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/me2mom/remoting_session.js
===================================================================
--- remoting/webapp/me2mom/remoting_session.js (revision 88003)
+++ remoting/webapp/me2mom/remoting_session.js (working copy)
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Maximum numer of lines to record in the debug log.
-// Only the most recent <n> lines are displayed.
-var MAX_DEBUG_LOG_SIZE = 1000;
-
var remoting = chrome.extension.getBackgroundPage().remoting;
// Chromoting session API version (for this javascript).
@@ -170,19 +166,6 @@
}
-function toggleDebugLog() {
- debugLog = document.getElementById('debug-log');
- toggleButton = document.getElementById('debug-log-toggle');
-
- if (!debugLog.style.display || debugLog.style.display == 'none') {
- debugLog.style.display = 'block';
- toggleButton.value = 'Hide Debug Log';
- } else {
- debugLog.style.display = 'none';
- toggleButton.value = 'Show Debug Log';
- }
-}
-
function toggleScaleToFit() {
remoting.scaleToFit = !remoting.scaleToFit;
document.getElementById('scale-to-fit-toggle').value =
@@ -313,28 +296,6 @@
addToDebugLog('plugin: ' + msg);
}
-/**
- * Add the given message to the debug log.
- *
- * @param {string} message The debug info to add to the log.
- */
-function addToDebugLog(message) {
- var debugLog = document.getElementById('debug-log');
-
- // Remove lines from top if we've hit our max log size.
- if (debugLog.childNodes.length == MAX_DEBUG_LOG_SIZE) {
- debugLog.removeChild(debugLog.firstChild);
- }
-
- // Add the new <p> to the end of the debug log.
- var p = document.createElement('p');
- p.appendChild(document.createTextNode(message));
- debugLog.appendChild(p);
-
- // Scroll to bottom of div
- debugLog.scrollTop = debugLog.scrollHeight;
-}
-
function updateStatusBarStats() {
if (remoting.plugin.status != remoting.plugin.STATUS_CONNECTED)
return;
« no previous file with comments | « remoting/webapp/me2mom/remoting_session.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698