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

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

Issue 10824296: Enables HiDPI favicon to be displayed in tab strip on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | chrome/browser/ui/views/tab_icon_view.h » ('j') | ui/gfx/image/image_skia.h » ('J')
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_tab_helper.h" 5 #include "chrome/browser/favicon/favicon_tab_helper.h"
6 6
7 #include "chrome/browser/favicon/favicon_handler.h" 7 #include "chrome/browser/favicon/favicon_handler.h"
8 #include "chrome/browser/favicon/favicon_util.h" 8 #include "chrome/browser/favicon/favicon_util.h"
9 #include "chrome/browser/favicon/select_favicon_frames.h" 9 #include "chrome/browser/favicon/select_favicon_frames.h"
10 #include "chrome/browser/history/history.h" 10 #include "chrome/browser/history/history.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 void FaviconTabHelper::OnDidDownloadFavicon( 192 void FaviconTabHelper::OnDidDownloadFavicon(
193 int id, 193 int id,
194 const GURL& image_url, 194 const GURL& image_url,
195 bool errored, 195 bool errored,
196 int requested_size, 196 int requested_size,
197 const std::vector<SkBitmap>& bitmaps) { 197 const std::vector<SkBitmap>& bitmaps) {
198 // TODO: Possibly do bitmap selection in FaviconHandler, so that it can score 198 // TODO: Possibly do bitmap selection in FaviconHandler, so that it can score
199 // favicons better. 199 // favicons better.
200 std::vector<ui::ScaleFactor> scale_factors; 200 std::vector<ui::ScaleFactor> scale_factors;
201 #if defined(OS_MACOSX)
202 scale_factors = ui::GetSupportedScaleFactors(); 201 scale_factors = ui::GetSupportedScaleFactors();
203 #else
204 scale_factors.push_back(ui::SCALE_FACTOR_100P); // TODO: Aura?
205 #endif
206 gfx::Image favicon( 202 gfx::Image favicon(
207 SelectFaviconFrames(bitmaps, scale_factors, requested_size)); 203 SelectFaviconFrames(bitmaps, scale_factors, requested_size));
208 favicon_handler_->OnDidDownloadFavicon(id, image_url, errored, favicon); 204 favicon_handler_->OnDidDownloadFavicon(id, image_url, errored, favicon);
209 if (touch_icon_handler_.get()) 205 if (touch_icon_handler_.get())
210 touch_icon_handler_->OnDidDownloadFavicon(id, image_url, errored, favicon); 206 touch_icon_handler_->OnDidDownloadFavicon(id, image_url, errored, favicon);
211 } 207 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tab_icon_view.h » ('j') | ui/gfx/image/image_skia.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698