Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4237)

Unified Diff: chrome/browser/views/tabs/side_tab.cc

Issue 1141005: Revert r42156, r42157, r42160. Allow dynamic switching in and out of sidetabs... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/tabs/side_tab.h ('k') | chrome/browser/views/tabs/side_tab_strip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/side_tab.cc
===================================================================
--- chrome/browser/views/tabs/side_tab.cc (revision 42174)
+++ chrome/browser/views/tabs/side_tab.cc (working copy)
@@ -56,8 +56,6 @@
hover_animation_.reset(new SlideAnimation(this));
hover_animation_->SetSlideDuration(kHoverDurationMs);
-
- SetContextMenuController(this);
}
SideTab::~SideTab() {
@@ -112,15 +110,6 @@
}
////////////////////////////////////////////////////////////////////////////////
-// 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 @@
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) {
« no previous file with comments | « chrome/browser/views/tabs/side_tab.h ('k') | chrome/browser/views/tabs/side_tab_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698