mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-13 01:54:52 +08:00
These work just like other event listener breakpoints, but via a EventBreakpoints model and not DOMDebugger since the target doesn't have a DOM. CategorizedBreakpoint was also moved out of DOMDebuggerModel, to make it clear that it and CategorizedBreakpointsSidebarPane don't actually depend on DOMDebugger. Bug: 1209620 Change-Id: Ia1395c5dbea5cba9430abd3871c68ec2821fa256 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3233318 Commit-Queue: Maksim Orlovich <morlovich@chromium.org> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
36 lines
786 B
TypeScript
36 lines
786 B
TypeScript
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
export class CategorizedBreakpoint {
|
|
readonly #categoryInternal: string;
|
|
titleInternal: string;
|
|
enabledInternal: boolean;
|
|
|
|
constructor(category: string, title: string) {
|
|
this.#categoryInternal = category;
|
|
this.titleInternal = title;
|
|
this.enabledInternal = false;
|
|
}
|
|
|
|
category(): string {
|
|
return this.#categoryInternal;
|
|
}
|
|
|
|
enabled(): boolean {
|
|
return this.enabledInternal;
|
|
}
|
|
|
|
setEnabled(enabled: boolean): void {
|
|
this.enabledInternal = enabled;
|
|
}
|
|
|
|
title(): string {
|
|
return this.titleInternal;
|
|
}
|
|
|
|
setTitle(title: string): void {
|
|
this.titleInternal = title;
|
|
}
|
|
}
|