Skip to content

Commit 6d42f5f

Browse files
Nancy LiDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Small changes to make the code more clean
- Remove the icon, which is removed in crrev.com/c/5735233 - Change a function name to clarify it is when the memory setting is changed - fix a typo. Bug: none Change-Id: Ieb3d0edcaf1f8f6536f11c0c0e07ed92fcebc7f8 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5953722 Commit-Queue: Jack Franklin <[email protected]> Reviewed-by: Jack Franklin <[email protected]> Auto-Submit: Nancy Li <[email protected]>
1 parent ce0b81e commit 6d42f5f

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

front_end/panels/timeline/TimelineMiniMap.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
import * as Common from '../../core/common/common.js';
66
import * as Trace from '../../models/trace/trace.js';
77
import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';
8-
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
98
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
109
import * as UI from '../../ui/legacy/legacy.js';
11-
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
1210

1311
import * as TimelineComponents from './components/components.js';
1412
import {ModificationsManager} from './ModificationsManager.js';
@@ -57,12 +55,6 @@ export class TimelineMiniMap extends
5755
this.#breadcrumbsUI = new TimelineComponents.BreadcrumbsUI.BreadcrumbsUI();
5856
this.element.prepend(this.#breadcrumbsUI);
5957

60-
const icon = new IconButton.Icon.Icon();
61-
icon.setAttribute('name', 'left-panel-open');
62-
icon.setAttribute('jslog', `${VisualLogging.action('timeline.sidebar-open').track({click: true})}`);
63-
icon.addEventListener('click', () => {
64-
this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.OPEN_SIDEBAR_BUTTON_CLICKED, {});
65-
});
6658
this.#overviewComponent.show(this.element);
6759

6860
this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.OVERVIEW_PANE_WINDOW_CHANGED, event => {

front_end/panels/timeline/TimelinePanel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
497497

498498
this.showMemorySetting = Common.Settings.Settings.instance().createSetting('timeline-show-memory', false);
499499
this.showMemorySetting.setTitle(i18nString(UIStrings.memory));
500-
this.showMemorySetting.addChangeListener(this.onModeChanged, this);
500+
this.showMemorySetting.addChangeListener(this.onMemoryModeChanged, this);
501501

502502
this.#thirdPartyTracksSetting = TimelinePanel.extensionDataVisibilitySetting();
503503
this.#thirdPartyTracksSetting.addChangeListener(this.#extensionDataVisibilityChanged, this);
@@ -616,7 +616,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
616616
event.bounds, {ignoreMiniMapBounds: true, shouldAnimate: true});
617617
});
618618

619-
this.onModeChanged();
619+
this.onMemoryModeChanged();
620620
this.populateToolbar();
621621
// The viewMode is set by default to the landing page, so we don't call
622622
// `#changeView` here and can instead directly call showLandingPage();
@@ -1312,7 +1312,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
13121312
});
13131313
}
13141314

1315-
private onModeChanged(): void {
1315+
private onMemoryModeChanged(): void {
13161316
this.flameChart.updateCountersGraphToggle(this.showMemorySetting.get());
13171317
this.updateMiniMap();
13181318
this.doResize();

front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ export class TimelineOverviewPane extends Common.ObjectWrapper.eventMixin<EventT
9292
}
9393

9494
enableCreateBreadcrumbsButton(): void {
95-
const breacrumbsElement = this.overviewGrid.enableCreateBreadcrumbsButton();
96-
breacrumbsElement.addEventListener('mousemove', this.onMouseMove.bind(this), true);
97-
breacrumbsElement.addEventListener('mouseleave', this.hideCursor.bind(this), true);
95+
const breadcrumbsElement = this.overviewGrid.enableCreateBreadcrumbsButton();
96+
breadcrumbsElement.addEventListener('mousemove', this.onMouseMove.bind(this), true);
97+
breadcrumbsElement.addEventListener('mouseleave', this.hideCursor.bind(this), true);
9898
}
9999

100100
private onMouseMove(event: Event): void {

0 commit comments

Comments
 (0)