Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 this.element = shadowContainer; | 66 this.element = shadowContainer; |
| 67 | 67 |
| 68 this._includeRootDOMNode = !omitRootDOMNode; | 68 this._includeRootDOMNode = !omitRootDOMNode; |
| 69 this._selectEnabled = selectEnabled; | 69 this._selectEnabled = selectEnabled; |
| 70 /** @type {?SDK.DOMNode} */ | 70 /** @type {?SDK.DOMNode} */ |
| 71 this._rootDOMNode = null; | 71 this._rootDOMNode = null; |
| 72 /** @type {?SDK.DOMNode} */ | 72 /** @type {?SDK.DOMNode} */ |
| 73 this._selectedDOMNode = null; | 73 this._selectedDOMNode = null; |
| 74 | 74 |
| 75 this._visible = false; | 75 this._visible = false; |
| 76 this._reportedNodeSelectedUMA = false; | |
| 76 | 77 |
| 77 this._popoverHelper = new UI.PopoverHelper(this._element); | 78 this._popoverHelper = new UI.PopoverHelper(this._element); |
| 78 this._popoverHelper.initializeCallbacks(this._getPopoverAnchor.bind(this), t his._showPopover.bind(this)); | 79 this._popoverHelper.initializeCallbacks(this._getPopoverAnchor.bind(this), t his._showPopover.bind(this)); |
| 79 this._popoverHelper.setTimeout(0, 100); | 80 this._popoverHelper.setTimeout(0, 100); |
| 80 | 81 |
| 81 /** @type {!Map<!SDK.DOMNode, !Elements.ElementsTreeOutline.UpdateRecord>} * / | 82 /** @type {!Map<!SDK.DOMNode, !Elements.ElementsTreeOutline.UpdateRecord>} * / |
| 82 this._updateRecords = new Map(); | 83 this._updateRecords = new Map(); |
| 83 /** @type {!Set<!Elements.ElementsTreeElement>} */ | 84 /** @type {!Set<!Elements.ElementsTreeElement>} */ |
| 84 this._treeElementsBeingUpdated = new Set(); | 85 this._treeElementsBeingUpdated = new Set(); |
| 85 | 86 |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 386 } | 387 } |
| 387 | 388 |
| 388 if (selectedNode) | 389 if (selectedNode) |
| 389 this._revealAndSelectNode(selectedNode, true); | 390 this._revealAndSelectNode(selectedNode, true); |
| 390 } | 391 } |
| 391 | 392 |
| 392 /** | 393 /** |
| 393 * @param {boolean} focus | 394 * @param {boolean} focus |
| 394 */ | 395 */ |
| 395 _selectedNodeChanged(focus) { | 396 _selectedNodeChanged(focus) { |
| 397 if (this._reportedNodeSelectedUMA) | |
|
pfeldman
2017/02/10 23:00:46
!this._reportedNodeSelectedUMA
chenwilliam
2017/02/25 00:49:14
I want to report it on the second time and afterwa
| |
| 398 Host.userMetrics.actionTaken(Host.UserMetrics.Action.ElementsTreeOutlineSe lectNode); | |
| 399 this._reportedNodeSelectedUMA = true; | |
| 396 this.dispatchEventToListeners( | 400 this.dispatchEventToListeners( |
| 397 Elements.ElementsTreeOutline.Events.SelectedNodeChanged, {node: this._se lectedDOMNode, focus: focus}); | 401 Elements.ElementsTreeOutline.Events.SelectedNodeChanged, {node: this._se lectedDOMNode, focus: focus}); |
| 398 } | 402 } |
| 399 | 403 |
| 400 /** | 404 /** |
| 401 * @param {!Array.<!SDK.DOMNode>} nodes | 405 * @param {!Array.<!SDK.DOMNode>} nodes |
| 402 */ | 406 */ |
| 403 _fireElementsTreeUpdated(nodes) { | 407 _fireElementsTreeUpdated(nodes) { |
| 404 this.dispatchEventToListeners(Elements.ElementsTreeOutline.Events.ElementsTr eeUpdated, nodes); | 408 this.dispatchEventToListeners(Elements.ElementsTreeOutline.Events.ElementsTr eeUpdated, nodes); |
| 405 } | 409 } |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1688 */ | 1692 */ |
| 1689 function resolved(node) { | 1693 function resolved(node) { |
| 1690 if (node) { | 1694 if (node) { |
| 1691 this.treeOutline._selectedDOMNode = node; | 1695 this.treeOutline._selectedDOMNode = node; |
| 1692 this.treeOutline._selectedNodeChanged(); | 1696 this.treeOutline._selectedNodeChanged(); |
| 1693 } | 1697 } |
| 1694 } | 1698 } |
| 1695 return true; | 1699 return true; |
| 1696 } | 1700 } |
| 1697 }; | 1701 }; |
| OLD | NEW |