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

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

Issue 74873002: Fixed namespace in chrome/utility/cloud_print/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/utility/cloud_print/bitmap_image.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_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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 namespace printing { 10 namespace cloud_print {
11 11
12 class BitmapImage { 12 class BitmapImage {
13 public: 13 public:
14 enum Colorspace { 14 enum Colorspace {
15 // These are the only types PWGEncoder currently supports. 15 // These are the only types PWGEncoder currently supports.
16 RGBA, 16 RGBA,
17 BGRA 17 BGRA
18 }; 18 };
19 19
20 BitmapImage(int32 width, 20 BitmapImage(int32 width,
21 int32 height, 21 int32 height,
22 Colorspace colorspace); 22 Colorspace colorspace);
23 ~BitmapImage(); 23 ~BitmapImage();
24 24
25 uint8 channels() const; 25 uint8 channels() const;
26 int32 width() const { return width_; } 26 int32 width() const { return width_; }
27 int32 height() const { return height_; } 27 int32 height() const { return height_; }
28 Colorspace colorspace() const { return colorspace_; } 28 Colorspace colorspace() const { return colorspace_; }
29 29
30 const uint8* pixel_data() const { return data_.get(); } 30 const uint8* pixel_data() const { return data_.get(); }
31 uint8* mutable_pixel_data() { return data_.get(); } 31 uint8* pixel_data() { return data_.get(); }
32 32
33 private: 33 private:
34 int32 width_; 34 int32 width_;
35 int32 height_; 35 int32 height_;
36 Colorspace colorspace_; 36 Colorspace colorspace_;
37 scoped_ptr<uint8[]> data_; 37 scoped_ptr<uint8[]> data_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(BitmapImage); 39 DISALLOW_COPY_AND_ASSIGN(BitmapImage);
40 }; 40 };
41 41
42 } // namespace printing 42 } // namespace cloud_print
43 43
44 #endif // CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_ 44 #endif // CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/utility/cloud_print/bitmap_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698