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/views/tabs/base_tab.h" | 5 #include "chrome/browser/views/tabs/base_tab.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "app/animation_container.h" | 9 #include "app/animation_container.h" |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 controller()->CloseTab(this); | 437 controller()->CloseTab(this); |
438 } | 438 } |
439 | 439 |
440 void BaseTab::ShowContextMenu(views::View* source, | 440 void BaseTab::ShowContextMenu(views::View* source, |
441 const gfx::Point& p, | 441 const gfx::Point& p, |
442 bool is_mouse_gesture) { | 442 bool is_mouse_gesture) { |
443 if (controller()) | 443 if (controller()) |
444 controller()->ShowContextMenu(this, p); | 444 controller()->ShowContextMenu(this, p); |
445 } | 445 } |
446 | 446 |
447 void BaseTab::ThemeChanged() { | 447 void BaseTab::OnThemeChanged() { |
448 views::View::ThemeChanged(); | |
449 LoadThemeImages(); | 448 LoadThemeImages(); |
450 } | 449 } |
451 | 450 |
452 void BaseTab::SetFavIconHidingOffset(int offset) { | 451 void BaseTab::SetFavIconHidingOffset(int offset) { |
453 fav_icon_hiding_offset_ = offset; | 452 fav_icon_hiding_offset_ = offset; |
454 SchedulePaint(); | 453 SchedulePaint(); |
455 } | 454 } |
456 | 455 |
457 void BaseTab::DisplayCrashedFavIcon() { | 456 void BaseTab::DisplayCrashedFavIcon() { |
458 should_display_crashed_favicon_ = true; | 457 should_display_crashed_favicon_ = true; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 font_height_ = font_->height(); | 521 font_height_ = font_->height(); |
523 } | 522 } |
524 | 523 |
525 // static | 524 // static |
526 void BaseTab::LoadThemeImages() { | 525 void BaseTab::LoadThemeImages() { |
527 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 526 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
528 loading_animation_frames = rb.GetBitmapNamed(IDR_THROBBER); | 527 loading_animation_frames = rb.GetBitmapNamed(IDR_THROBBER); |
529 waiting_animation_frames = rb.GetBitmapNamed(IDR_THROBBER_WAITING); | 528 waiting_animation_frames = rb.GetBitmapNamed(IDR_THROBBER_WAITING); |
530 loading_animation_size_ = loading_animation_frames->height(); | 529 loading_animation_size_ = loading_animation_frames->height(); |
531 } | 530 } |
OLD | NEW |