summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/side_tab.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/tabs/side_tab.cc')
-rw-r--r--chrome/browser/views/tabs/side_tab.cc26
1 files changed, 5 insertions, 21 deletions
diff --git a/chrome/browser/views/tabs/side_tab.cc b/chrome/browser/views/tabs/side_tab.cc
index ee160d7..c08eaaa 100644
--- a/chrome/browser/views/tabs/side_tab.cc
+++ b/chrome/browser/views/tabs/side_tab.cc
@@ -56,8 +56,6 @@ SideTab::SideTab(SideTabModel* model)
hover_animation_.reset(new SlideAnimation(this));
hover_animation_->SetSlideDuration(kHoverDurationMs);
-
- SetContextMenuController(this);
}
SideTab::~SideTab() {
@@ -112,15 +110,6 @@ void SideTab::ButtonPressed(views::Button* sender, const views::Event& event) {
}
////////////////////////////////////////////////////////////////////////////////
-// SideTab, views::ContextMenuController implementation:
-
-void SideTab::ShowContextMenu(views::View* source,
- const gfx::Point& p,
- bool is_mouse_gesture) {
- model_->ShowContextMenu(this, p);
-}
-
-////////////////////////////////////////////////////////////////////////////////
// SideTab, views::View overrides:
void SideTab::Layout() {
@@ -130,19 +119,14 @@ void SideTab::Layout() {
gfx::Size ps = close_button_->GetPreferredSize();
int close_y = (height() - ps.height()) / 2;
- close_button_->SetBounds(
- std::max(0, width() - ps.width() - close_y),
- close_y,
- ps.width(),
- ps.height());
+ close_button_->SetBounds(width() - ps.width() - close_y, close_y, ps.width(),
+ ps.height());
int title_y = (height() - font_->height()) / 2;
int title_x = icon_bounds_.right() + kIconTitleSpacing;
- title_bounds_.SetRect(
- title_x,
- title_y,
- std::max(0, close_button_->x() - kTitleCloseSpacing - title_x),
- font_->height());
+ title_bounds_.SetRect(title_x, title_y,
+ close_button_->x() - kTitleCloseSpacing - title_x,
+ font_->height());
}
void SideTab::Paint(gfx::Canvas* canvas) {