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

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

Issue 893843007: Experiment to hide close buttons of inactive tabs when using touch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 29841163c87a34db0b811cabbf7030e9156b44aa..50ec84bad663bdf2c376095fdbe5ba5031bfabb6 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -1431,21 +1431,24 @@ int Tab::IconCapacity() const {
bool Tab::ShouldShowIcon() const {
return chrome::ShouldTabShowFavicon(
- IconCapacity(), data().mini, IsActive(), data().show_icon,
+ IconCapacity(), width(), controller_->TouchWasUsedAsLastInput(),
+ data().mini, IsActive(), data().show_icon,
media_indicator_button_ ? media_indicator_button_->showing_media_state() :
data_.media_state);
}
bool Tab::ShouldShowMediaIndicator() const {
return chrome::ShouldTabShowMediaIndicator(
- IconCapacity(), data().mini, IsActive(), data().show_icon,
+ IconCapacity(), width(), controller_->TouchWasUsedAsLastInput(),
+ data().mini, IsActive(), data().show_icon,
media_indicator_button_ ? media_indicator_button_->showing_media_state() :
data_.media_state);
}
bool Tab::ShouldShowCloseBox() const {
return chrome::ShouldTabShowCloseButton(
- IconCapacity(), data().mini, IsActive());
+ IconCapacity(), width(), controller_->TouchWasUsedAsLastInput(),
+ data().mini, IsActive());
}
double Tab::GetThrobValue() {

Powered by Google App Engine
This is Rietveld 408576698