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 "extensions/common/api/printer_provider_internal.h"
11 class DictionaryValue
;
14 namespace extensions
{
18 // Interface for observing chrome.printerProviderInternal API function calls.
19 class PrinterProviderInternalAPIObserver
{
21 // Used by chrome.printerProviderInternal API to report
22 // chrome.printerProvider.onGetCapabilityRequested result returned by the
23 // extension |extensiod|.
24 // |request_id| is the request id passed to the original
25 // chrome.printerProvider.onGetCapabilityRequested event.
26 virtual void OnGetCapabilityResult(const Extension
* extension
,
28 const base::DictionaryValue
& result
) = 0;
30 // Used by chrome.printerProviderInternal API to report
31 // chrome.printerProvider.onPrintRequested result returned by the extension
33 // |request_id| is the request id passed to the original
34 // chrome.printerProvider.onPrintRequested event.
35 virtual void OnPrintResult(
36 const Extension
* extension
,
38 core_api::printer_provider_internal::PrintError error
) = 0;
41 virtual ~PrinterProviderInternalAPIObserver() {}
44 } // namespace extensions
46 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERNAL_API_OBSERVER_H_