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

Side by Side Diff: webkit/glue/image_decoder.h

Issue 8741006: Add exports needed for glue to build as a component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to r112585 Created 9 years 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 | « webkit/glue/idb_bindings.h ('k') | webkit/glue/image_resource_fetcher.h » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "ui/gfx/size.h" 6 #include "ui/gfx/size.h"
7 #include "webkit/glue/webkit_glue_export.h"
7 8
8 class SkBitmap; 9 class SkBitmap;
9 10
10 namespace webkit_glue { 11 namespace webkit_glue {
11 12
12 // Provides an interface to WebKit's image decoders. 13 // Provides an interface to WebKit's image decoders.
13 // 14 //
14 // Note to future: This class should be deleted. We should have our own nice 15 // Note to future: This class should be deleted. We should have our own nice
15 // image decoders in base/gfx, and our port should use those. Currently, it's 16 // image decoders in base/gfx, and our port should use those. Currently, it's
16 // the other way around. 17 // the other way around.
17 class ImageDecoder { 18 class WEBKIT_GLUE_EXPORT ImageDecoder {
18 public: 19 public:
19 // Use the constructor with desired_size when you think you may have an .ico 20 // Use the constructor with desired_size when you think you may have an .ico
20 // format and care about which size you get back. Otherwise, use the 0-arg 21 // format and care about which size you get back. Otherwise, use the 0-arg
21 // constructor. 22 // constructor.
22 ImageDecoder(); 23 ImageDecoder();
23 ImageDecoder(const gfx::Size& desired_icon_size); 24 ImageDecoder(const gfx::Size& desired_icon_size);
24 ~ImageDecoder(); 25 ~ImageDecoder();
25 26
26 // Call this function to decode the image. If successful, the decoded image 27 // Call this function to decode the image. If successful, the decoded image
27 // will be returned. Otherwise, an empty bitmap will be returned. 28 // will be returned. Otherwise, an empty bitmap will be returned.
28 SkBitmap Decode(const unsigned char* data, size_t size) const; 29 SkBitmap Decode(const unsigned char* data, size_t size) const;
29 30
30 private: 31 private:
31 // Size will be empty to get the largest possible size. 32 // Size will be empty to get the largest possible size.
32 gfx::Size desired_icon_size_; 33 gfx::Size desired_icon_size_;
33 34
34 DISALLOW_COPY_AND_ASSIGN(ImageDecoder); 35 DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
35 }; 36 };
36 37
37 } // namespace webkit_glue 38 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/idb_bindings.h ('k') | webkit/glue/image_resource_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698