OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/image_loading_helper.h" | 5 #include "content/renderer/image_loading_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/child/image_decoder.h" | 9 #include "content/child/image_decoder.h" |
10 #include "content/common/image_messages.h" | 10 #include "content/common/image_messages.h" |
11 #include "content/public/common/url_constants.h" | 11 #include "content/public/common/url_constants.h" |
12 #include "content/public/renderer/render_view.h" | 12 #include "content/public/renderer/render_view.h" |
13 #include "content/renderer/fetchers/multi_resolution_image_resource_fetcher.h" | 13 #include "content/renderer/fetchers/multi_resolution_image_resource_fetcher.h" |
14 #include "net/base/data_url.h" | 14 #include "net/base/data_url.h" |
15 #include "skia/ext/image_operations.h" | 15 #include "skia/ext/image_operations.h" |
16 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 16 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
17 #include "third_party/WebKit/public/platform/WebVector.h" | 17 #include "third_party/WebKit/public/platform/WebVector.h" |
18 #include "third_party/WebKit/public/web/WebFrame.h" | 18 #include "third_party/WebKit/public/web/WebFrame.h" |
19 #include "third_party/WebKit/public/web/WebView.h" | 19 #include "third_party/WebKit/public/web/WebView.h" |
20 #include "ui/gfx/favicon_size.h" | 20 #include "ui/gfx/favicon_size.h" |
21 #include "ui/gfx/size.h" | 21 #include "ui/gfx/size.h" |
22 #include "ui/gfx/skbitmap_operations.h" | 22 #include "ui/gfx/skbitmap_operations.h" |
23 #include "webkit/glue/webkit_glue.h" | |
24 | 23 |
25 using blink::WebFrame; | 24 using blink::WebFrame; |
26 using blink::WebVector; | 25 using blink::WebVector; |
27 using blink::WebURL; | 26 using blink::WebURL; |
28 using blink::WebURLRequest; | 27 using blink::WebURLRequest; |
29 | 28 |
30 namespace { | 29 namespace { |
31 | 30 |
32 // Proportionally resizes the |image| to fit in a box of size | 31 // Proportionally resizes the |image| to fit in a box of size |
33 // |max_image_size|. | 32 // |max_image_size|. |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 bool handled = true; | 197 bool handled = true; |
199 IPC_BEGIN_MESSAGE_MAP(ImageLoadingHelper, message) | 198 IPC_BEGIN_MESSAGE_MAP(ImageLoadingHelper, message) |
200 IPC_MESSAGE_HANDLER(ImageMsg_DownloadImage, OnDownloadImage) | 199 IPC_MESSAGE_HANDLER(ImageMsg_DownloadImage, OnDownloadImage) |
201 IPC_MESSAGE_UNHANDLED(handled = false) | 200 IPC_MESSAGE_UNHANDLED(handled = false) |
202 IPC_END_MESSAGE_MAP() | 201 IPC_END_MESSAGE_MAP() |
203 | 202 |
204 return handled; | 203 return handled; |
205 } | 204 } |
206 | 205 |
207 } // namespace content | 206 } // namespace content |
OLD | NEW |