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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 2368653002: Remove pre-MD code from browser/ui/views/tabs/tab.cc (Closed)
Patch Set: fix compile Created 4 years, 3 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
Index: chrome/browser/ui/views/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index d0fb9bc054349826db71315d5ab3e3e7389a327d..2c6f42faee8fa4f7f016e6a7a5eedc4740c4e402 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -676,8 +676,7 @@ TabStrip::TabStrip(TabStripController* controller)
stacked_layout_(false),
adjust_layout_(false),
reset_to_shrink_on_exit_(false),
- mouse_move_count_(0),
- immersive_style_(false) {
+ mouse_move_count_(0) {
Init();
SetEventTargeter(
std::unique_ptr<views::ViewTargeter>(new views::ViewTargeter(this)));
@@ -740,7 +739,7 @@ gfx::Rect TabStrip::GetNewTabButtonBounds() {
}
bool TabStrip::SizeTabButtonToTopOfTabStrip() {
- // Extend the button to the screen edge in maximized and immersive fullscreen.
+ // Extend the button to the screen edge in maximized mode.
views::Widget* widget = GetWidget();
return browser_defaults::kSizeTabButtonToTopOfTabStrip ||
(widget && (widget->IsMaximized() || widget->IsFullscreen()));
@@ -1101,12 +1100,6 @@ void TabStrip::SetBackgroundOffset(const gfx::Point& offset) {
newtab_button_->set_background_offset(offset);
}
-void TabStrip::SetImmersiveStyle(bool enable) {
- if (immersive_style_ == enable)
- return;
- immersive_style_ = enable;
-}
-
SkAlpha TabStrip::GetInactiveAlpha(bool for_new_tab_button) const {
#if defined(USE_ASH)
static const SkAlpha kInactiveTabAlphaAsh = 230;
@@ -1248,10 +1241,6 @@ void TabStrip::MaybeStartDrag(
return;
}
- // Do not do any dragging of tabs when using the super short immersive style.
- if (IsImmersiveStyle())
- return;
-
int model_index = GetModelIndexOfTab(tab);
if (!IsValidModelIndex(model_index)) {
CHECK(false);
@@ -1391,19 +1380,13 @@ bool TabStrip::ShouldPaintTab(
bool TabStrip::CanPaintThrobberToLayer() const {
// Disable layer-painting of throbbers if dragging, if any tab animation is in
- // progress, or if stacked tabs are enabled. Also disable in fullscreen: when
- // "immersive" the tab strip could be sliding in or out while transitioning to
- // or away from |immersive_style_| and, for other modes, there's no tab strip.
+ // progress, or if stacked tabs are enabled. Also disable in fullscreen.
const bool dragging = drag_controller_ && drag_controller_->started_drag();
const views::Widget* widget = GetWidget();
return widget && !touch_layout_ && !dragging && !IsAnimating() &&
!widget->IsFullscreen();
}
-bool TabStrip::IsImmersiveStyle() const {
- return immersive_style_;
-}
-
SkColor TabStrip::GetToolbarTopSeparatorColor() const {
return controller_->GetToolbarTopSeparatorColor();
}
@@ -1595,8 +1578,7 @@ gfx::Size TabStrip::GetPreferredSize() const {
std::max(needed_tab_width, min_selected_width), largest_min_tab_width);
}
return gfx::Size(needed_tab_width + GetNewTabButtonWidth(),
- immersive_style_ ? Tab::GetImmersiveHeight()
- : Tab::GetMinimumInactiveSize().height());
+ Tab::GetMinimumInactiveSize().height());
}
void TabStrip::OnDragEntered(const DropTargetEvent& event) {
@@ -1696,11 +1678,6 @@ views::View* TabStrip::GetTooltipHandlerForPoint(const gfx::Point& point) {
return this;
}
-// static
-int TabStrip::GetImmersiveHeight() {
- return Tab::GetImmersiveHeight();
-}
-
///////////////////////////////////////////////////////////////////////////////
// TabStrip, private:

Powered by Google App Engine
This is Rietveld 408576698