- add sources.
[platform/framework/web/crosswalk.git] / src / content / browser / renderer_host / pepper / pepper_print_settings_manager.h
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.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINT_SETTINGS_MANAGER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINT_SETTINGS_MANAGER_H_
7
8 #include "base/bind.h"
9 #include "base/compiler_specific.h"
10 #include "content/common/content_export.h"
11 #include "ppapi/c/dev/pp_print_settings_dev.h"
12
13 namespace content {
14
15 // A class for getting the default print settings for the default printer.
16 class CONTENT_EXPORT PepperPrintSettingsManager {
17  public:
18   typedef std::pair<PP_PrintSettings_Dev, int32_t> Result;
19   typedef base::Callback<void(Result)> Callback;
20
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;
26
27   virtual ~PepperPrintSettingsManager() {}
28 };
29
30 // Real implementation for getting the default print settings.
31 class CONTENT_EXPORT PepperPrintSettingsManagerImpl
32     : public PepperPrintSettingsManager {
33  public:
34   PepperPrintSettingsManagerImpl() {}
35   virtual ~PepperPrintSettingsManagerImpl() {}
36
37   // PepperPrintSettingsManager implementation.
38   virtual void GetDefaultPrintSettings(
39       PepperPrintSettingsManager::Callback callback) OVERRIDE;
40
41  private:
42   DISALLOW_COPY_AND_ASSIGN(PepperPrintSettingsManagerImpl);
43 };
44
45 }  // namespace content
46
47 #endif  // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINT_SETTINGS_MANAGER_H_