Add ICU message format support
[chromium-blink-merge.git] / extensions / browser / api / printer_provider_internal / printer_provider_internal_api_observer.h
blob16dd8aa3a8dc32b1f639fc6a90b8865bea72bf7c
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERNAL_API_OBSERVER_H_
6 #define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERNAL_API_OBSERVER_H_
8 #include <vector>
10 #include "extensions/common/api/printer_provider.h"
11 #include "extensions/common/api/printer_provider_internal.h"
13 namespace base {
14 class DictionaryValue;
15 class ListValue;
18 namespace extensions {
20 class Extension;
22 // Interface for observing chrome.printerProviderInternal API function calls.
23 class PrinterProviderInternalAPIObserver {
24 public:
25 using PrinterInfoVector =
26 std::vector<linked_ptr<api::printer_provider::PrinterInfo>>;
28 // Used by chrome.printerProviderInternal API to report
29 // chrome.printerProvider.onGetPrintersRequested result returned by the
30 // extension |extension|.
31 // |request_id| is the request id passed to the original
32 // chrome.printerProvider.onGetPrintersRequested event.
33 virtual void OnGetPrintersResult(const Extension* extension,
34 int request_id,
35 const PrinterInfoVector& result) = 0;
37 // Used by chrome.printerProviderInternal API to report
38 // chrome.printerProvider.onGetCapabilityRequested result returned by the
39 // extension |extensiod|.
40 // |request_id| is the request id passed to the original
41 // chrome.printerProvider.onGetCapabilityRequested event.
42 virtual void OnGetCapabilityResult(const Extension* extension,
43 int request_id,
44 const base::DictionaryValue& result) = 0;
46 // Used by chrome.printerProviderInternal API to report
47 // chrome.printerProvider.onPrintRequested result returned by the extension
48 // |extension|.
49 // |request_id| is the request id passed to the original
50 // chrome.printerProvider.onPrintRequested event.
51 virtual void OnPrintResult(
52 const Extension* extension,
53 int request_id,
54 api::printer_provider_internal::PrintError error) = 0;
56 // Used by chrome.printerProviderInternal API to report
57 // chrome.printerProvider.onGetUsbPrinterInfoRequested result returned by the
58 // extension |extension|.
59 // |request_id| is the request id passed to the original
60 // chrome.printerProvider.onGetUsbPrinterInfoRequested event.
61 virtual void OnGetUsbPrinterInfoResult(
62 const Extension* extension,
63 int request_id,
64 const api::printer_provider::PrinterInfo* printer_info) = 0;
66 protected:
67 virtual ~PrinterProviderInternalAPIObserver() {}
70 } // namespace extensions
72 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERNAL_API_OBSERVER_H_