| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |