OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/debug/alias.h" | 10 #include "base/debug/alias.h" |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 } | 563 } |
564 | 564 |
565 void BaseTab::AnimationCanceled(const ui::Animation* animation) { | 565 void BaseTab::AnimationCanceled(const ui::Animation* animation) { |
566 SchedulePaint(); | 566 SchedulePaint(); |
567 } | 567 } |
568 | 568 |
569 void BaseTab::AnimationEnded(const ui::Animation* animation) { | 569 void BaseTab::AnimationEnded(const ui::Animation* animation) { |
570 SchedulePaint(); | 570 SchedulePaint(); |
571 } | 571 } |
572 | 572 |
573 void BaseTab::ButtonPressed(views::Button* sender, const views::Event& event) { | 573 void BaseTab::ButtonPressed(views::Button* sender, const ui::Event& event) { |
574 DCHECK(sender == close_button_); | 574 DCHECK(sender == close_button_); |
575 controller()->CloseTab(this); | 575 controller()->CloseTab(this); |
576 } | 576 } |
577 | 577 |
578 void BaseTab::ShowContextMenuForView(views::View* source, | 578 void BaseTab::ShowContextMenuForView(views::View* source, |
579 const gfx::Point& point) { | 579 const gfx::Point& point) { |
580 if (controller() && !closing()) | 580 if (controller() && !closing()) |
581 controller()->ShowContextMenuForTab(this, point); | 581 controller()->ShowContextMenuForTab(this, point); |
582 } | 582 } |
583 | 583 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 // static | 639 // static |
640 void BaseTab::InitResources() { | 640 void BaseTab::InitResources() { |
641 static bool initialized = false; | 641 static bool initialized = false; |
642 if (!initialized) { | 642 if (!initialized) { |
643 initialized = true; | 643 initialized = true; |
644 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 644 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
645 font_ = new gfx::Font(rb.GetFont(ui::ResourceBundle::BaseFont)); | 645 font_ = new gfx::Font(rb.GetFont(ui::ResourceBundle::BaseFont)); |
646 font_height_ = font_->GetHeight(); | 646 font_height_ = font_->GetHeight(); |
647 } | 647 } |
648 } | 648 } |
OLD | NEW |