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

Side by Side Diff: chrome/browser/resources/net_internals/main.js

Issue 10834312: Make net-internals work a bit better on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Dictionary of constants (Initialized soon after loading by data from browser, 6 * Dictionary of constants (Initialized soon after loading by data from browser,
7 * updated on load log). The *Types dictionaries map strings to numeric IDs, 7 * updated on load log). The *Types dictionaries map strings to numeric IDs,
8 * while the *TypeNames are the other way around. 8 * while the *TypeNames are the other way around.
9 */ 9 */
10 var EventType = null; 10 var EventType = null;
(...skipping 29 matching lines...) Expand all
40 // We inherit from HorizontalSplitView 40 // We inherit from HorizontalSplitView
41 var superClass = HorizontalSplitView; 41 var superClass = HorizontalSplitView;
42 42
43 /** 43 /**
44 * Main entry point. Called once the page has loaded. 44 * Main entry point. Called once the page has loaded.
45 * @constructor 45 * @constructor
46 */ 46 */
47 function MainView() { 47 function MainView() {
48 assertFirstConstructorCall(MainView); 48 assertFirstConstructorCall(MainView);
49 49
50 if (hasTouchScreen())
51 document.body.classList.add('touch');
52
50 // This must be initialized before the tabs, so they can register as 53 // This must be initialized before the tabs, so they can register as
51 // observers. 54 // observers.
52 g_browser = BrowserBridge.getInstance(); 55 g_browser = BrowserBridge.getInstance();
53 56
54 // This must be the first constants observer, so other constants observers 57 // This must be the first constants observer, so other constants observers
55 // can safely use the globals, rather than depending on walking through 58 // can safely use the globals, rather than depending on walking through
56 // the constants themselves. 59 // the constants themselves.
57 g_browser.addConstantsObserver(new ConstantsObserver()); 60 g_browser.addConstantsObserver(new ConstantsObserver());
58 61
59 // This view is a left navigation bar. 62 // This view is a left navigation bar.
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 * Returns a string representation of |family|. 299 * Returns a string representation of |family|.
297 * @param {number} family An AddressFamily 300 * @param {number} family An AddressFamily
298 * @return {string} A representation of the given family. 301 * @return {string} A representation of the given family.
299 */ 302 */
300 function addressFamilyToString(family) { 303 function addressFamilyToString(family) {
301 var str = getKeyWithValue(AddressFamily, family); 304 var str = getKeyWithValue(AddressFamily, family);
302 // All the address family start with ADDRESS_FAMILY_*. 305 // All the address family start with ADDRESS_FAMILY_*.
303 // Strip that prefix since it is redundant and only clutters the output. 306 // Strip that prefix since it is redundant and only clutters the output.
304 return str.replace(/^ADDRESS_FAMILY_/, ''); 307 return str.replace(/^ADDRESS_FAMILY_/, '');
305 } 308 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/main.css ('k') | chrome/browser/resources/net_internals/proxy_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698