| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/multi_resolution_image_resource_fetcher.h" | 5 #include "content/renderer/fetchers/multi_resolution_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 "content/child/image_decoder.h" | 9 #include "content/child/image_decoder.h" |
| 10 #include "content/public/renderer/resource_fetcher.h" | 10 #include "content/public/renderer/resource_fetcher.h" |
| 11 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 11 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 12 #include "third_party/WebKit/public/web/WebFrame.h" | 12 #include "third_party/WebKit/public/web/WebFrame.h" |
| 13 #include "third_party/skia/include/core/SkBitmap.h" | 13 #include "third_party/skia/include/core/SkBitmap.h" |
| 14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/geometry/size.h" |
| 15 | 15 |
| 16 using blink::WebFrame; | 16 using blink::WebFrame; |
| 17 using blink::WebURLRequest; | 17 using blink::WebURLRequest; |
| 18 using blink::WebURLResponse; | 18 using blink::WebURLResponse; |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 | 21 |
| 22 MultiResolutionImageResourceFetcher::MultiResolutionImageResourceFetcher( | 22 MultiResolutionImageResourceFetcher::MultiResolutionImageResourceFetcher( |
| 23 const GURL& image_url, | 23 const GURL& image_url, |
| 24 WebFrame* frame, | 24 WebFrame* frame, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // If we get here, it means no image from server or couldn't decode the | 58 // If we get here, it means no image from server or couldn't decode the |
| 59 // response as an image. The delegate will see an empty vector. | 59 // response as an image. The delegate will see an empty vector. |
| 60 | 60 |
| 61 // Take a reference to the callback as running the callback may lead to our | 61 // Take a reference to the callback as running the callback may lead to our |
| 62 // destruction. | 62 // destruction. |
| 63 Callback callback = callback_; | 63 Callback callback = callback_; |
| 64 callback.Run(this, bitmaps); | 64 callback.Run(this, bitmaps); |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace content | 67 } // namespace content |
| OLD | NEW |