OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/renderer/fetchers/image_resource_fetcher.h" | 5 #include "content/renderer/fetchers/image_resource_fetcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
10 #include "content/child/image_decoder.h" | 10 #include "content/child/image_decoder.h" |
11 #include "content/public/renderer/resource_fetcher.h" | 11 #include "content/public/renderer/resource_fetcher.h" |
12 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 12 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
13 #include "third_party/WebKit/public/web/WebFrame.h" | 13 #include "third_party/WebKit/public/web/WebFrame.h" |
14 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
15 #include "ui/gfx/size.h" | 15 #include "ui/gfx/geometry/size.h" |
16 | 16 |
17 using blink::WebFrame; | 17 using blink::WebFrame; |
18 using blink::WebURLRequest; | 18 using blink::WebURLRequest; |
19 using blink::WebURLResponse; | 19 using blink::WebURLResponse; |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 ImageResourceFetcher::ImageResourceFetcher( | 23 ImageResourceFetcher::ImageResourceFetcher( |
24 const GURL& image_url, | 24 const GURL& image_url, |
25 WebFrame* frame, | 25 WebFrame* frame, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // response as an image. The delegate will see a null image, indicating | 60 // response as an image. The delegate will see a null image, indicating |
61 // that an error occurred. | 61 // that an error occurred. |
62 | 62 |
63 // Take a reference to the callback as running the callback may lead to our | 63 // Take a reference to the callback as running the callback may lead to our |
64 // destruction. | 64 // destruction. |
65 Callback callback = callback_; | 65 Callback callback = callback_; |
66 callback.Run(this, bitmap); | 66 callback.Run(this, bitmap); |
67 } | 67 } |
68 | 68 |
69 } // namespace content | 69 } // namespace content |
OLD | NEW |