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

Side by Side Diff: chrome/browser/favicon/favicon_service.cc

Issue 15388002: Supporting high dpi favicons in Instant Extended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/favicon/favicon_service.h ('k') | chrome/browser/favicon/favicon_types.h » ('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 (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 "chrome/browser/favicon/favicon_service.h" 5 #include "chrome/browser/favicon/favicon_service.h"
6 6
7 #include "base/hash.h" 7 #include "base/hash.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "chrome/browser/favicon/favicon_types.h"
10 #include "chrome/browser/favicon/favicon_util.h" 9 #include "chrome/browser/favicon/favicon_util.h"
11 #include "chrome/browser/history/history_backend.h" 10 #include "chrome/browser/history/history_backend.h"
12 #include "chrome/browser/history/history_service.h" 11 #include "chrome/browser/history/history_service.h"
13 #include "chrome/browser/history/history_service_factory.h" 12 #include "chrome/browser/history/history_service_factory.h"
14 #include "chrome/browser/history/select_favicon_frames.h" 13 #include "chrome/browser/history/select_favicon_frames.h"
15 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 14 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
15 #include "chrome/common/favicon/favicon_types.h"
16 #include "chrome/common/importer/imported_favicon_usage.h" 16 #include "chrome/common/importer/imported_favicon_usage.h"
17 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
18 #include "extensions/common/constants.h" 18 #include "extensions/common/constants.h"
19 #include "third_party/skia/include/core/SkBitmap.h" 19 #include "third_party/skia/include/core/SkBitmap.h"
20 #include "ui/gfx/codec/png_codec.h" 20 #include "ui/gfx/codec/png_codec.h"
21 #include "ui/gfx/favicon_size.h" 21 #include "ui/gfx/favicon_size.h"
22 #include "ui/gfx/image/image_skia.h" 22 #include "ui/gfx/image/image_skia.h"
23 23
24 using base::Bind; 24 using base::Bind;
25 25
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 if (!gfx::PNGCodec::EncodeBGRASkBitmap(resized_image.AsBitmap(), false, 364 if (!gfx::PNGCodec::EncodeBGRASkBitmap(resized_image.AsBitmap(), false,
365 &resized_bitmap_data)) { 365 &resized_bitmap_data)) {
366 callback.Run(chrome::FaviconBitmapResult()); 366 callback.Run(chrome::FaviconBitmapResult());
367 return; 367 return;
368 } 368 }
369 369
370 bitmap_result.bitmap_data = base::RefCountedBytes::TakeVector( 370 bitmap_result.bitmap_data = base::RefCountedBytes::TakeVector(
371 &resized_bitmap_data); 371 &resized_bitmap_data);
372 callback.Run(bitmap_result); 372 callback.Run(bitmap_result);
373 } 373 }
374
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_service.h ('k') | chrome/browser/favicon/favicon_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698