Enable PPAPI tests for non-SFI mode.
[chromium-blink-merge.git] / chrome / utility / cloud_print / pwg_encoder.h
bloba51aff6432c18ce37c94844ac90d5b2184dc899b
1 // Copyright 2013 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 CHROME_UTILITY_CLOUD_PRINT_PWG_ENCODER_H_
6 #define CHROME_UTILITY_CLOUD_PRINT_PWG_ENCODER_H_
8 #include <string>
10 #include "base/basictypes.h"
12 namespace cloud_print {
14 class BitmapImage;
16 class PwgEncoder {
17 public:
18 PwgEncoder();
20 void EncodeDocumentHeader(std::string *output) const;
21 bool EncodePage(const BitmapImage& image,
22 const uint32 dpi,
23 const uint32 total_pages,
24 std::string* output,
25 bool rotate) const;
27 private:
28 void EncodePageHeader(const BitmapImage& image, const uint32 dpi,
29 const uint32 total_pages, std::string* output) const;
30 bool EncodeRowFrom32Bit(const uint8* row,
31 const int width,
32 const int color_space,
33 std::string* output) const;
34 const uint8* GetRow(const BitmapImage& image, int row) const;
37 } // namespace cloud_print
39 #endif // CHROME_UTILITY_CLOUD_PRINT_PWG_ENCODER_H_