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

Side by Side Diff: content/renderer/image_downloader/image_downloader_impl.cc

Issue 2014013002: Add SkBitmap StructTraits for skia::mojo::Bitmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 6 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
« no previous file with comments | « content/renderer/BUILD.gn ('k') | mash/shelf/public/interfaces/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_downloader/image_downloader_impl.h" 5 #include "content/renderer/image_downloader/image_downloader_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "content/child/image_decoder.h" 12 #include "content/child/image_decoder.h"
13 #include "content/public/renderer/render_frame.h" 13 #include "content/public/renderer/render_frame.h"
14 #include "content/public/renderer/render_thread.h" 14 #include "content/public/renderer/render_thread.h"
15 #include "content/renderer/fetchers/multi_resolution_image_resource_fetcher.h" 15 #include "content/renderer/fetchers/multi_resolution_image_resource_fetcher.h"
16 #include "mojo/common/url_type_converters.h" 16 #include "mojo/common/url_type_converters.h"
17 #include "net/base/data_url.h" 17 #include "net/base/data_url.h"
18 #include "skia/ext/image_operations.h" 18 #include "skia/ext/image_operations.h"
19 #include "skia/public/type_converters.h"
20 #include "third_party/WebKit/public/platform/WebURLRequest.h" 19 #include "third_party/WebKit/public/platform/WebURLRequest.h"
21 #include "third_party/WebKit/public/platform/WebVector.h" 20 #include "third_party/WebKit/public/platform/WebVector.h"
22 #include "third_party/WebKit/public/web/WebLocalFrame.h" 21 #include "third_party/WebKit/public/web/WebLocalFrame.h"
23 #include "third_party/WebKit/public/web/WebView.h" 22 #include "third_party/WebKit/public/web/WebView.h"
24 #include "ui/gfx/favicon_size.h" 23 #include "ui/gfx/favicon_size.h"
25 #include "ui/gfx/geometry/size.h" 24 #include "ui/gfx/geometry/size.h"
26 #include "ui/gfx/skbitmap_operations.h" 25 #include "ui/gfx/skbitmap_operations.h"
27 #include "url/url_constants.h" 26 #include "url/url_constants.h"
28 27
29 using blink::WebCachePolicy; 28 using blink::WebCachePolicy;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 image_fetchers_.weak_erase(iter); 211 image_fetchers_.weak_erase(iter);
213 base::MessageLoop::current()->DeleteSoon(FROM_HERE, fetcher); 212 base::MessageLoop::current()->DeleteSoon(FROM_HERE, fetcher);
214 } 213 }
215 } 214 }
216 215
217 void ImageDownloaderImpl::ReplyDownloadResult( 216 void ImageDownloaderImpl::ReplyDownloadResult(
218 int32_t http_status_code, 217 int32_t http_status_code,
219 const std::vector<SkBitmap>& result_images, 218 const std::vector<SkBitmap>& result_images,
220 const std::vector<gfx::Size>& result_original_image_sizes, 219 const std::vector<gfx::Size>& result_original_image_sizes,
221 const DownloadImageCallback& callback) { 220 const DownloadImageCallback& callback) {
222 callback.Run(http_status_code, 221 callback.Run(http_status_code, mojo::Array<SkBitmap>::From(result_images),
223 mojo::Array<skia::mojom::BitmapPtr>::From(result_images),
224 result_original_image_sizes); 222 result_original_image_sizes);
225 } 223 }
226 224
227 } // namespace content 225 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/BUILD.gn ('k') | mash/shelf/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698