| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/tabs/tab_renderer_gtk.h" | 5 #include "chrome/browser/gtk/tabs/tab_renderer_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 void TabRendererGtk::AnimationEnded(const Animation* animation) { | 557 void TabRendererGtk::AnimationEnded(const Animation* animation) { |
| 558 gtk_widget_queue_draw(tab_.get()); | 558 gtk_widget_queue_draw(tab_.get()); |
| 559 } | 559 } |
| 560 | 560 |
| 561 //////////////////////////////////////////////////////////////////////////////// | 561 //////////////////////////////////////////////////////////////////////////////// |
| 562 // TabRendererGtk, private: | 562 // TabRendererGtk, private: |
| 563 | 563 |
| 564 void TabRendererGtk::StartCrashAnimation() { | 564 void TabRendererGtk::StartCrashAnimation() { |
| 565 if (!crash_animation_.get()) | 565 if (!crash_animation_.get()) |
| 566 crash_animation_.reset(new FavIconCrashAnimation(this)); | 566 crash_animation_.reset(new FavIconCrashAnimation(this)); |
| 567 crash_animation_->Reset(); | 567 crash_animation_->Stop(); |
| 568 crash_animation_->Start(); | 568 crash_animation_->Start(); |
| 569 } | 569 } |
| 570 | 570 |
| 571 void TabRendererGtk::StopCrashAnimation() { | 571 void TabRendererGtk::StopCrashAnimation() { |
| 572 if (!crash_animation_.get()) | 572 if (!crash_animation_.get()) |
| 573 return; | 573 return; |
| 574 crash_animation_->Stop(); | 574 crash_animation_->Stop(); |
| 575 } | 575 } |
| 576 | 576 |
| 577 bool TabRendererGtk::IsPerformingCrashAnimation() const { | 577 bool TabRendererGtk::IsPerformingCrashAnimation() const { |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 // Force the font size to 9pt, which matches Windows' default font size | 1070 // Force the font size to 9pt, which matches Windows' default font size |
| 1071 // (taken from the system). | 1071 // (taken from the system). |
| 1072 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); | 1072 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); |
| 1073 title_font_ = new gfx::Font(gfx::Font::CreateFont(base_font.FontName(), 9)); | 1073 title_font_ = new gfx::Font(gfx::Font::CreateFont(base_font.FontName(), 9)); |
| 1074 title_font_height_ = title_font_->height(); | 1074 title_font_height_ = title_font_->height(); |
| 1075 | 1075 |
| 1076 crashed_fav_icon = rb.GetBitmapNamed(IDR_SAD_FAVICON); | 1076 crashed_fav_icon = rb.GetBitmapNamed(IDR_SAD_FAVICON); |
| 1077 | 1077 |
| 1078 initialized_ = true; | 1078 initialized_ = true; |
| 1079 } | 1079 } |
| OLD | NEW |