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

Side by Side Diff: chrome/utility/cloud_print/bitmap_image.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
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_BITMAP_IMAGE_H_ 5 #ifndef CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_
6 #define CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_ 6 #define CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_
7 7
8 #include <stdint.h>
9
10 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/geometry/point.h" 12 #include "ui/gfx/geometry/point.h"
10 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
11 14
12 namespace cloud_print { 15 namespace cloud_print {
13 16
14 class BitmapImage { 17 class BitmapImage {
15 public: 18 public:
16 enum Colorspace { 19 enum Colorspace {
17 // These are the only types PWGEncoder currently supports. 20 // These are the only types PWGEncoder currently supports.
18 RGBA, 21 RGBA,
19 BGRA 22 BGRA
20 }; 23 };
21 24
22 BitmapImage(const gfx::Size& size, Colorspace colorspace); 25 BitmapImage(const gfx::Size& size, Colorspace colorspace);
23 ~BitmapImage(); 26 ~BitmapImage();
24 27
25 uint8 channels() const; 28 uint8_t channels() const;
26 const gfx::Size& size() const { return size_; } 29 const gfx::Size& size() const { return size_; }
27 Colorspace colorspace() const { return colorspace_; } 30 Colorspace colorspace() const { return colorspace_; }
28 31
29 const uint8* pixel_data() const { return data_.get(); } 32 const uint8_t* pixel_data() const { return data_.get(); }
30 uint8* pixel_data() { return data_.get(); } 33 uint8_t* pixel_data() { return data_.get(); }
31 34
32 const uint8* GetPixel(const gfx::Point& point) const; 35 const uint8_t* GetPixel(const gfx::Point& point) const;
33 36
34 private: 37 private:
35 gfx::Size size_; 38 gfx::Size size_;
36 Colorspace colorspace_; 39 Colorspace colorspace_;
37 scoped_ptr<uint8[]> data_; 40 scoped_ptr<uint8_t[]> data_;
38 41
39 DISALLOW_COPY_AND_ASSIGN(BitmapImage); 42 DISALLOW_COPY_AND_ASSIGN(BitmapImage);
40 }; 43 };
41 44
42 } // namespace cloud_print 45 } // namespace cloud_print
43 46
44 #endif // CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_ 47 #endif // CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_
OLDNEW
« no previous file with comments | « chrome/utility/chrome_content_utility_ipc_whitelist.cc ('k') | chrome/utility/cloud_print/bitmap_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698