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

Side by Side Diff: chrome/browser/views/tabs/tab_renderer.cc

Issue 18392: Fix some problems with scaled icons. This allows the TabIconView to automati... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <limits> 5 #include <limits>
6 6
7 #include "chrome/browser/views/tabs/tab_renderer.h" 7 #include "chrome/browser/views/tabs/tab_renderer.h"
8 8
9 #include "chrome/app/theme/theme_resources.h" 9 #include "chrome/app/theme/theme_resources.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 if (should_display_crashed_favicon_) { 394 if (should_display_crashed_favicon_) {
395 canvas->DrawBitmapInt(*crashed_fav_icon, 0, 0, 395 canvas->DrawBitmapInt(*crashed_fav_icon, 0, 0,
396 crashed_fav_icon->width(), 396 crashed_fav_icon->width(),
397 crashed_fav_icon->height(), 397 crashed_fav_icon->height(),
398 favicon_bounds_.x(), 398 favicon_bounds_.x(),
399 favicon_bounds_.y() + fav_icon_hiding_offset_, 399 favicon_bounds_.y() + fav_icon_hiding_offset_,
400 kFaviconSize, kFaviconSize, 400 kFaviconSize, kFaviconSize,
401 true); 401 true);
402 } else { 402 } else {
403 if (!data_.favicon.isNull()) { 403 if (!data_.favicon.isNull()) {
404 // TODO(pkasting): Use code in tab_icon_view.cc:PaintIcon() (or switch
405 // to using that class to render the favicon).
404 canvas->DrawBitmapInt(data_.favicon, 0, 0, 406 canvas->DrawBitmapInt(data_.favicon, 0, 0,
405 data_.favicon.width(), 407 data_.favicon.width(),
406 data_.favicon.height(), 408 data_.favicon.height(),
407 favicon_bounds_.x(), 409 favicon_bounds_.x(),
408 favicon_bounds_.y() + fav_icon_hiding_offset_, 410 favicon_bounds_.y() + fav_icon_hiding_offset_,
409 kFaviconSize, kFaviconSize, 411 kFaviconSize, kFaviconSize,
410 true); 412 true);
411 } 413 }
412 } 414 }
413 canvas->restore(); 415 canvas->restore();
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 } 673 }
672 674
673 void TabRenderer::DisplayCrashedFavIcon() { 675 void TabRenderer::DisplayCrashedFavIcon() {
674 should_display_crashed_favicon_ = true; 676 should_display_crashed_favicon_ = true;
675 } 677 }
676 678
677 void TabRenderer::ResetCrashedFavIcon() { 679 void TabRenderer::ResetCrashedFavIcon() {
678 should_display_crashed_favicon_ = false; 680 should_display_crashed_favicon_ = false;
679 } 681 }
680 682
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698