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

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

Issue 671463002: DevTools: make flame chart a web component. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 /* 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } 560 }
561 561
562 /** 562 /**
563 * @return {string} 563 * @return {string}
564 */ 564 */
565 WebInspector.manageBlackboxingButtonLabel = function() 565 WebInspector.manageBlackboxingButtonLabel = function()
566 { 566 {
567 return WebInspector.UIString("Manage framework blackboxing..."); 567 return WebInspector.UIString("Manage framework blackboxing...");
568 } 568 }
569 569
570 WebInspector.installPortStyles = function() 570 /**
571 * @param {!Element} element
572 * @return {boolean}
573 */
574 WebInspector.installComponentRootStyles = function(element)
571 { 575 {
572 var platform = WebInspector.platform(); 576 var wasInstalled = element.classList.contains("component-root");
573 document.body.classList.add("platform-" + platform); 577 if (wasInstalled)
574 var flavor = WebInspector.platformFlavor(); 578 return false;
575 if (flavor) 579 element.classList.add("component-root", "platform-" + WebInspector.platform( ));
576 document.body.classList.add("platform-" + flavor); 580 return true;
577 var port = WebInspector.port(); 581 }
578 document.body.classList.add("port-" + port); 582
583 /**
584 * @param {!Element} element
585 */
586 WebInspector.uninstallComponentRootStyles = function(element)
587 {
588 var wasInstalled = element.classList.remove("component-root", "platform-" + WebInspector.platform());
579 } 589 }
580 590
581 WebInspector._windowFocused = function(event) 591 WebInspector._windowFocused = function(event)
582 { 592 {
583 if (event.target.document.nodeType === Node.DOCUMENT_NODE) 593 if (event.target.document.nodeType === Node.DOCUMENT_NODE)
584 document.body.classList.remove("inactive"); 594 document.body.classList.remove("inactive");
585 } 595 }
586 596
587 WebInspector._windowBlurred = function(event) 597 WebInspector._windowBlurred = function(event)
588 { 598 {
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 __proto__: WebInspector.Object.prototype 1081 __proto__: WebInspector.Object.prototype
1072 } 1082 }
1073 1083
1074 WebInspector.initializeUIUtils = function() 1084 WebInspector.initializeUIUtils = function()
1075 { 1085 {
1076 window.addEventListener("focus", WebInspector._windowFocused, false); 1086 window.addEventListener("focus", WebInspector._windowFocused, false);
1077 window.addEventListener("blur", WebInspector._windowBlurred, false); 1087 window.addEventListener("blur", WebInspector._windowBlurred, false);
1078 document.addEventListener("focus", WebInspector._focusChanged, true); 1088 document.addEventListener("focus", WebInspector._focusChanged, true);
1079 document.addEventListener("blur", WebInspector._documentBlurred, true); 1089 document.addEventListener("blur", WebInspector._documentBlurred, true);
1080 } 1090 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698