OLD | NEW |
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 |
11 class SkBitmap; | 11 class SkBitmap; |
12 class WebViewImpl; | |
13 | 12 |
14 namespace webkit_glue { | 13 namespace webkit_glue { |
15 | 14 |
16 // ImageResourceFetcher handles downloading an image for a webview. Once | 15 // ImageResourceFetcher handles downloading an image for a webview. Once |
17 // downloading is done the hosting WebViewImpl is notified. ImageResourceFetcher | 16 // downloading is done the supplied callback is notified. ImageResourceFetcher |
18 // is used to download the favicon and images for web apps. | 17 // is used to download the favicon and images for web apps. |
19 class ImageResourceFetcher { | 18 class ImageResourceFetcher { |
20 public: | 19 public: |
21 typedef Callback2<ImageResourceFetcher*, const SkBitmap&>::Type Callback; | 20 typedef Callback2<ImageResourceFetcher*, const SkBitmap&>::Type Callback; |
22 | 21 |
23 ImageResourceFetcher(const GURL& image_url, | 22 ImageResourceFetcher(const GURL& image_url, |
24 WebKit::WebFrame* frame, | 23 WebKit::WebFrame* frame, |
25 int id, | 24 int id, |
26 int image_size, | 25 int image_size, |
27 Callback* callback); | 26 Callback* callback); |
(...skipping 26 matching lines...) Expand all Loading... |
54 | 53 |
55 // Does the actual download. | 54 // Does the actual download. |
56 scoped_ptr<ResourceFetcher> fetcher_; | 55 scoped_ptr<ResourceFetcher> fetcher_; |
57 | 56 |
58 DISALLOW_EVIL_CONSTRUCTORS(ImageResourceFetcher); | 57 DISALLOW_EVIL_CONSTRUCTORS(ImageResourceFetcher); |
59 }; | 58 }; |
60 | 59 |
61 } // namespace webkit_glue | 60 } // namespace webkit_glue |
62 | 61 |
63 #endif // WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_ | 62 #endif // WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_ |
OLD | NEW |