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

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

Issue 149295: Don't forget to free the callbacks! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/glue/image_resource_fetcher.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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_ 5 #ifndef WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
6 #define WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_ 6 #define WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "webkit/glue/resource_fetcher.h" 9 #include "webkit/glue/resource_fetcher.h"
10 10
(...skipping 21 matching lines...) Expand all
32 const GURL& image_url() const { return image_url_; } 32 const GURL& image_url() const { return image_url_; }
33 33
34 // Unique identifier for the request. 34 // Unique identifier for the request.
35 int id() const { return id_; } 35 int id() const { return id_; }
36 36
37 private: 37 private:
38 // ResourceFetcher::Callback. Decodes the image and invokes callback_. 38 // ResourceFetcher::Callback. Decodes the image and invokes callback_.
39 void OnURLFetchComplete(const WebKit::WebURLResponse& response, 39 void OnURLFetchComplete(const WebKit::WebURLResponse& response,
40 const std::string& data); 40 const std::string& data);
41 41
42 Callback* callback_; 42 scoped_ptr<Callback> callback_;
43 43
44 // Unique identifier for the request. 44 // Unique identifier for the request.
45 const int id_; 45 const int id_;
46 46
47 // URL of the image. 47 // URL of the image.
48 const GURL image_url_; 48 const GURL image_url_;
49 49
50 // The size of the image. This is only a hint that is used if the image 50 // The size of the image. This is only a hint that is used if the image
51 // contains multiple sizes. A value of 0 results in using the first frame 51 // contains multiple sizes. A value of 0 results in using the first frame
52 // of the image. 52 // of the image.
53 const int image_size_; 53 const int image_size_;
54 54
55 // Does the actual download. 55 // Does the actual download.
56 scoped_ptr<ResourceFetcher> fetcher_; 56 scoped_ptr<ResourceFetcher> fetcher_;
57 57
58 DISALLOW_EVIL_CONSTRUCTORS(ImageResourceFetcher); 58 DISALLOW_EVIL_CONSTRUCTORS(ImageResourceFetcher);
59 }; 59 };
60 60
61 } // namespace webkit_glue 61 } // namespace webkit_glue
62 62
63 #endif // WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_ 63 #endif // WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/image_resource_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698