blob: ae2b8511e11b09904237fa05bb30088a7bb8f4f3 [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.
#ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_PRINTING_METRICS_PRINTING_METRICS_API_H_
#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_PRINTING_METRICS_PRINTING_METRICS_API_H_
#include <vector>
#include "chrome/browser/ash/printing/history/print_job_info.pb.h"
#include "extensions/browser/extension_function.h"
#include "extensions/browser/extension_function_histogram_value.h"
namespace extensions {
class PrintingMetricsGetPrintJobsFunction : public ExtensionFunction {
protected:
~PrintingMetricsGetPrintJobsFunction() override;
// ExtensionFunction:
ResponseAction Run() override;
private:
void OnPrintJobsRetrieved(
bool success,
std::vector<ash::printing::proto::PrintJobInfo> print_job_info_protos);
DECLARE_EXTENSION_FUNCTION("printingMetrics.getPrintJobs",
PRINTINGMETRICS_GETPRINTJOBS)
};
} // namespace extensions
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_PRINTING_METRICS_PRINTING_METRICS_API_H_