| 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/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
| 10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 pulse_animation_->SetSlideDuration(kPulseDurationMs); | 274 pulse_animation_->SetSlideDuration(kPulseDurationMs); |
| 275 } | 275 } |
| 276 | 276 |
| 277 TabRenderer::~TabRenderer() { | 277 TabRenderer::~TabRenderer() { |
| 278 delete crash_animation_; | 278 delete crash_animation_; |
| 279 } | 279 } |
| 280 | 280 |
| 281 void TabRenderer::UpdateData(TabContents* contents) { | 281 void TabRenderer::UpdateData(TabContents* contents) { |
| 282 DCHECK(contents); | 282 DCHECK(contents); |
| 283 data_.favicon = contents->GetFavIcon(); | 283 data_.favicon = contents->GetFavIcon(); |
| 284 data_.title = contents->GetTitle(); | 284 data_.title = UTF16ToWideHack(contents->GetTitle()); |
| 285 data_.loading = contents->is_loading(); | 285 data_.loading = contents->is_loading(); |
| 286 data_.off_the_record = contents->profile()->IsOffTheRecord(); | 286 data_.off_the_record = contents->profile()->IsOffTheRecord(); |
| 287 data_.show_icon = contents->ShouldDisplayFavIcon(); | 287 data_.show_icon = contents->ShouldDisplayFavIcon(); |
| 288 data_.show_download_icon = contents->IsDownloadShelfVisible(); | 288 data_.show_download_icon = contents->IsDownloadShelfVisible(); |
| 289 data_.crashed = contents->is_crashed(); | 289 data_.crashed = contents->is_crashed(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void TabRenderer::UpdateFromModel() { | 292 void TabRenderer::UpdateFromModel() { |
| 293 // Force a layout, since the tab may have grown a favicon. | 293 // Force a layout, since the tab may have grown a favicon. |
| 294 Layout(); | 294 Layout(); |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 } | 694 } |
| 695 | 695 |
| 696 void TabRenderer::DisplayCrashedFavIcon() { | 696 void TabRenderer::DisplayCrashedFavIcon() { |
| 697 should_display_crashed_favicon_ = true; | 697 should_display_crashed_favicon_ = true; |
| 698 } | 698 } |
| 699 | 699 |
| 700 void TabRenderer::ResetCrashedFavIcon() { | 700 void TabRenderer::ResetCrashedFavIcon() { |
| 701 should_display_crashed_favicon_ = false; | 701 should_display_crashed_favicon_ = false; |
| 702 } | 702 } |
| 703 | 703 |
| OLD | NEW |