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

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

Issue 2690443002: cros-md: Remove the non-MD immersive mode code paths (Closed)
Patch Set: rebase & code comments Created 3 years, 10 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/ui/views/tabs/tab_strip.h ('k') | chrome/browser/ui/views/tabs/tab_strip_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c11d5fc62110793ebd1d10adec2599bf34ee405f..2bdc850878e764572a1e4c1ba013c42d9e463a39 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -594,8 +594,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)));
@@ -1019,12 +1018,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;
@@ -1166,10 +1159,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);
@@ -1309,18 +1298,14 @@ 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.
+ // "immersive" the tab strip could be sliding in or out; for other modes,
+ // there's no tab strip.
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();
}
@@ -1516,8 +1501,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) {
@@ -1617,11 +1601,6 @@ views::View* TabStrip::GetTooltipHandlerForPoint(const gfx::Point& point) {
return this;
}
-// static
-int TabStrip::GetImmersiveHeight() {
- return Tab::GetImmersiveHeight();
-}
-
///////////////////////////////////////////////////////////////////////////////
// TabStrip, private:
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.h ('k') | chrome/browser/ui/views/tabs/tab_strip_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698