blob: 60549e195d66d4e871a810bbab840d489bc25284 [file] [log] [blame]
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {FeedSidePanelCallbackRouter, FeedSidePanelHandlerFactory, FeedSidePanelHandlerRemote} from './feed.mojom-webui.js';
// Used to make calls on the remote PageHandler interface. Singleton that client
// modules can use directly.
export const feedSidePanelHandler = new FeedSidePanelHandlerRemote();
export const feedSidePanelCallbackRouter = new FeedSidePanelCallbackRouter();
// Use PageHandlerFactory to create a connection to PageHandler.
const factoryRemote = FeedSidePanelHandlerFactory.getRemote();
factoryRemote.createFeedSidePanelHandler(
feedSidePanelHandler.$.bindNewPipeAndPassReceiver(),
feedSidePanelCallbackRouter.$.bindNewPipeAndPassRemote());