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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js

Issue 2450973002: [DevTools] Inherit WI.Target from Protocol.Target. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
5 * Copyright (C) 2009 Joseph Pecoraro 5 * Copyright (C) 2009 Joseph Pecoraro
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 break; 1892 break;
1893 } 1893 }
1894 hsla[0] = Number.constrain(hue, 0, 1); 1894 hsla[0] = Number.constrain(hue, 0, 1);
1895 hsla[1] = Number.constrain(sat, 0, 1); 1895 hsla[1] = Number.constrain(sat, 0, 1);
1896 hsla[2] = Number.constrain(lit, 0, 1); 1896 hsla[2] = Number.constrain(lit, 0, 1);
1897 hsla[3] = Number.constrain(alpha, 0, 1); 1897 hsla[3] = Number.constrain(alpha, 0, 1);
1898 } 1898 }
1899 }; 1899 };
1900 1900
1901 /** 1901 /**
1902 * @param {?NetworkAgent.ResourcePriority} priority
1903 * @return {string}
1904 */
1905 WebInspector.uiLabelForPriority = function(priority)
1906 {
1907 var labelMap = WebInspector.uiLabelForPriority._priorityToUILabel;
1908 if (!labelMap) {
1909 labelMap = new Map([
1910 [NetworkAgent.ResourcePriority.VeryLow, WebInspector.UIString("Lowes t")],
1911 [NetworkAgent.ResourcePriority.Low, WebInspector.UIString("Low")],
1912 [NetworkAgent.ResourcePriority.Medium, WebInspector.UIString("Medium ")],
1913 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")],
1914 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High est")]
1915 ]);
1916 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap;
1917 }
1918 return labelMap.get(priority) || WebInspector.UIString("Unknown");
1919 };
1920
1921 /**
1922 * @param {string} url 1902 * @param {string} url
1923 * @param {string=} linkText 1903 * @param {string=} linkText
1924 * @param {string=} classes 1904 * @param {string=} classes
1925 * @param {boolean=} isExternal 1905 * @param {boolean=} isExternal
1926 * @param {string=} tooltipText 1906 * @param {string=} tooltipText
1927 * @return {!Element} 1907 * @return {!Element}
1928 */ 1908 */
1929 WebInspector.linkifyURLAsNode = function(url, linkText, classes, isExternal, too ltipText) 1909 WebInspector.linkifyURLAsNode = function(url, linkText, classes, isExternal, too ltipText)
1930 { 1910 {
1931 if (!linkText) 1911 if (!linkText)
(...skipping 25 matching lines...) Expand all
1957 * @param {string} title 1937 * @param {string} title
1958 * @return {!Element} 1938 * @return {!Element}
1959 */ 1939 */
1960 WebInspector.linkifyDocumentationURLAsNode = function(article, title) 1940 WebInspector.linkifyDocumentationURLAsNode = function(article, title)
1961 { 1941 {
1962 return WebInspector.linkifyURLAsNode("https://developers.google.com/web/tool s/chrome-devtools/" + article, title, undefined, true); 1942 return WebInspector.linkifyURLAsNode("https://developers.google.com/web/tool s/chrome-devtools/" + article, title, undefined, true);
1963 }; 1943 };
1964 1944
1965 /** @type {!WebInspector.ThemeSupport} */ 1945 /** @type {!WebInspector.ThemeSupport} */
1966 WebInspector.themeSupport; 1946 WebInspector.themeSupport;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698