// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module tabs_api.mojom;
import "components/browser_apis/tab_strip/tab_strip_api_data_model.mojom";
import "components/browser_apis/tab_strip/tab_strip_api_types.mojom";
struct OnTabsCreatedEvent {
// Tab ids of the newly created tabs.
array<TabCreatedContainer> tabs;
};
struct OnTabsClosedEvent {
// Tab ids of the closed tabs.
array<NodeId> tabs;
};
struct OnDataChangedEvent {
// The updated data for the node in the tab strip. The client can use the ID
// within the data union to identify which node was updated.
Data data;
};
struct OnCollectionCreatedEvent {
// Position of the node in the tab strip.
Position position;
Container collection;
};
// Fired when any node in the tab strip tree is moved.
// "Node" is the generic term for any item which can be a single Tab
// or a collection (ie: TabGroup or SplitTab).
struct OnNodeMovedEvent {
// The id of the node that moved.
NodeId id;
// The original position.
Position from;
// The new position.
Position to;
};