1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINT_SETTINGS_MANAGER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINT_SETTINGS_MANAGER_H_
9 #include "base/compiler_specific.h"
10 #include "content/common/content_export.h"
11 #include "ppapi/c/dev/pp_print_settings_dev.h"
15 // A class for getting the default print settings for the default printer.
16 class CONTENT_EXPORT PepperPrintSettingsManager
{
18 typedef std::pair
<PP_PrintSettings_Dev
, int32_t> Result
;
19 typedef base::Callback
<void(Result
)> Callback
;
21 // The default print settings are obtained asynchronously and |callback|
22 // is called with the the print settings when they are available. |callback|
23 // will always be called on the same thread from which
24 // |GetDefaultPrintSettings| was issued.
25 virtual void GetDefaultPrintSettings(Callback callback
) = 0;
27 virtual ~PepperPrintSettingsManager() {}
30 // Real implementation for getting the default print settings.
31 class CONTENT_EXPORT PepperPrintSettingsManagerImpl
32 : public PepperPrintSettingsManager
{
34 PepperPrintSettingsManagerImpl() {}
35 ~PepperPrintSettingsManagerImpl() override
{}
37 // PepperPrintSettingsManager implementation.
38 void GetDefaultPrintSettings(
39 PepperPrintSettingsManager::Callback callback
) override
;
42 DISALLOW_COPY_AND_ASSIGN(PepperPrintSettingsManagerImpl
);
45 } // namespace content
47 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINT_SETTINGS_MANAGER_H_