Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: chrome/utility/cloud_print/pwg_encoder.h

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/utility/cloud_print/bitmap_image.cc ('k') | chrome/utility/cloud_print/pwg_encoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_UTILITY_CLOUD_PRINT_PWG_ENCODER_H_ 5 #ifndef CHROME_UTILITY_CLOUD_PRINT_PWG_ENCODER_H_
6 #define CHROME_UTILITY_CLOUD_PRINT_PWG_ENCODER_H_ 6 #define CHROME_UTILITY_CLOUD_PRINT_PWG_ENCODER_H_
7 7
8 #include <stdint.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/basictypes.h"
11 12
12 namespace cloud_print { 13 namespace cloud_print {
13 14
14 class BitmapImage; 15 class BitmapImage;
15 16
16 struct PwgHeaderInfo { 17 struct PwgHeaderInfo {
17 PwgHeaderInfo() 18 PwgHeaderInfo()
18 : dpi(300), 19 : dpi(300),
19 total_pages(1), 20 total_pages(1),
20 flipx(false), 21 flipx(false),
21 flipy(false), 22 flipy(false),
22 color_space(SRGB), 23 color_space(SRGB),
23 duplex(false), 24 duplex(false),
24 tumble(false) {} 25 tumble(false) {}
25 enum ColorSpace { SGRAY = 18, SRGB = 19 }; 26 enum ColorSpace { SGRAY = 18, SRGB = 19 };
26 uint32 dpi; 27 uint32_t dpi;
27 uint32 total_pages; 28 uint32_t total_pages;
28 bool flipx; 29 bool flipx;
29 bool flipy; 30 bool flipy;
30 ColorSpace color_space; 31 ColorSpace color_space;
31 bool duplex; 32 bool duplex;
32 bool tumble; 33 bool tumble;
33 }; 34 };
34 35
35 class PwgEncoder { 36 class PwgEncoder {
36 public: 37 public:
37 PwgEncoder(); 38 PwgEncoder();
(...skipping 12 matching lines...) Expand all
50 void EncodeRow(RandomAccessIterator pos, 51 void EncodeRow(RandomAccessIterator pos,
51 RandomAccessIterator row_end, 52 RandomAccessIterator row_end,
52 bool monochrome, 53 bool monochrome,
53 std::string* output) const; 54 std::string* output) const;
54 55
55 template <typename InputStruct> 56 template <typename InputStruct>
56 bool EncodePageWithColorspace(const BitmapImage& image, 57 bool EncodePageWithColorspace(const BitmapImage& image,
57 const PwgHeaderInfo& pwg_header_info, 58 const PwgHeaderInfo& pwg_header_info,
58 std::string* output) const; 59 std::string* output) const;
59 60
60 const uint8* GetRow(const BitmapImage& image, int row, bool flipy) const; 61 const uint8_t* GetRow(const BitmapImage& image, int row, bool flipy) const;
61 }; 62 };
62 63
63 } // namespace cloud_print 64 } // namespace cloud_print
64 65
65 #endif // CHROME_UTILITY_CLOUD_PRINT_PWG_ENCODER_H_ 66 #endif // CHROME_UTILITY_CLOUD_PRINT_PWG_ENCODER_H_
OLDNEW
« no previous file with comments | « chrome/utility/cloud_print/bitmap_image.cc ('k') | chrome/utility/cloud_print/pwg_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698