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

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: Rebased 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') | 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_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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 float score = 0; 198 float score = 0;
199 // TODO: Possibly do bitmap selection in FaviconHandler, so that it can score 199 // TODO: Possibly do bitmap selection in FaviconHandler, so that it can score
200 // favicons better. 200 // favicons better.
201 std::vector<ui::ScaleFactor> scale_factors; 201 std::vector<ui::ScaleFactor> scale_factors;
202 #if defined(OS_MACOSX)
203 scale_factors = ui::GetSupportedScaleFactors(); 202 scale_factors = ui::GetSupportedScaleFactors();
204 #else
205 scale_factors.push_back(ui::SCALE_FACTOR_100P); // TODO: Aura?
206 #endif
207 gfx::Image favicon(SelectFaviconFrames( 203 gfx::Image favicon(SelectFaviconFrames(
208 bitmaps, scale_factors, requested_size, &score)); 204 bitmaps, scale_factors, requested_size, &score));
209 favicon_handler_->OnDidDownloadFavicon( 205 favicon_handler_->OnDidDownloadFavicon(
210 id, image_url, errored, favicon, score); 206 id, image_url, errored, favicon, score);
211 if (touch_icon_handler_.get()) { 207 if (touch_icon_handler_.get()) {
212 touch_icon_handler_->OnDidDownloadFavicon( 208 touch_icon_handler_->OnDidDownloadFavicon(
213 id, image_url, errored, favicon, score); 209 id, image_url, errored, favicon, score);
214 } 210 }
215 } 211 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tab_icon_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698