OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/tabs/base_tab.h" | 5 #include "chrome/browser/ui/views/tabs/base_tab.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 controller()->CloseTab(this); | 473 controller()->CloseTab(this); |
474 } | 474 } |
475 | 475 |
476 void BaseTab::ShowContextMenu(views::View* source, | 476 void BaseTab::ShowContextMenu(views::View* source, |
477 const gfx::Point& p, | 477 const gfx::Point& p, |
478 bool is_mouse_gesture) { | 478 bool is_mouse_gesture) { |
479 if (controller()) | 479 if (controller()) |
480 controller()->ShowContextMenu(this, p); | 480 controller()->ShowContextMenu(this, p); |
481 } | 481 } |
482 | 482 |
| 483 int BaseTab::loading_animation_frame() const { |
| 484 return loading_animation_frame_; |
| 485 } |
| 486 |
| 487 bool BaseTab::should_display_crashed_favicon() const { |
| 488 return should_display_crashed_favicon_; |
| 489 } |
| 490 |
| 491 int BaseTab::fav_icon_hiding_offset() const { |
| 492 return fav_icon_hiding_offset_; |
| 493 } |
| 494 |
483 void BaseTab::SetFavIconHidingOffset(int offset) { | 495 void BaseTab::SetFavIconHidingOffset(int offset) { |
484 fav_icon_hiding_offset_ = offset; | 496 fav_icon_hiding_offset_ = offset; |
485 ScheduleIconPaint(); | 497 ScheduleIconPaint(); |
486 } | 498 } |
487 | 499 |
488 void BaseTab::DisplayCrashedFavIcon() { | 500 void BaseTab::DisplayCrashedFavIcon() { |
489 should_display_crashed_favicon_ = true; | 501 should_display_crashed_favicon_ = true; |
490 } | 502 } |
491 | 503 |
492 void BaseTab::ResetCrashedFavIcon() { | 504 void BaseTab::ResetCrashedFavIcon() { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 // static | 538 // static |
527 void BaseTab::InitResources() { | 539 void BaseTab::InitResources() { |
528 static bool initialized = false; | 540 static bool initialized = false; |
529 if (!initialized) { | 541 if (!initialized) { |
530 initialized = true; | 542 initialized = true; |
531 font_ = new gfx::Font( | 543 font_ = new gfx::Font( |
532 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); | 544 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); |
533 font_height_ = font_->GetHeight(); | 545 font_height_ = font_->GetHeight(); |
534 } | 546 } |
535 } | 547 } |
OLD | NEW |