blob: 3aa2f0a40f0fe3e8bad12f992be2cd2aed0e4e2c [file] [log] [blame]
// Copyright 2019 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.
package com.googlesource.chromium.plugins.coverage;
import static com.google.gerrit.server.project.ProjectResource.PROJECT_KIND;
import com.google.gerrit.extensions.registration.DynamicSet;
import com.google.gerrit.extensions.restapi.RestApiModule;
import com.google.gerrit.extensions.webui.JavaScriptPlugin;
import com.google.gerrit.extensions.webui.WebUiPlugin;
public class CoverageModule extends RestApiModule {
@Override
protected void configure() {
// Point to the JavaScript that provides the main functionality of this plugin.
DynamicSet.bind(binder(), WebUiPlugin.class)
.toInstance(new JavaScriptPlugin("chromium-coverage.js"));
// Register the config endpoint used by the JavaScript client code.
get(PROJECT_KIND, "config").to(GetConfig.class);
}
}