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

Issue 1710253003: Misc. Tab-related cleanup. (Closed)

Created:
4 years, 10 months ago by Peter Kasting
Modified:
4 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Misc. Tab-related cleanup. * Pass in the AnimationContainer directly instead of having a setter, since the only place that ever sets this does it immediately on creation. This allows Tab to not have to worry about if the animation container changes or disappears over time. * Comment fix * Create animations unconditionally in constructor instead of dynamically as needed. Animations aren't that big or expensive to create, and doing this avoids the need to remember to null-check everywhere in the code. * Inline some constants right above the sole block where they're used * Add 4-arg constructor for MultiAnimation::Parts and use constructor delegation to minimize the duplicated code footprint * Reorder a conditional to remove nesting * When converting from double to int, round instead of truncating; use ToRoundedInt() as much as possible * Make boolean expression somewhat less confusing * Rename some constants to more closely match their use * Better structure for #ifdefs in TabStrip::GetInactiveAlpha() BUG=none TEST=none Committed: https://crrev.com/158f43592244183d9f8e2666b27e3637fa1dfc21 Cr-Commit-Position: refs/heads/master@{#377281}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Review comments; fix test failure #

Patch Set 3 : Better structure for #ifdefs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -134 lines) Patch
M chrome/browser/ui/views/tabs/tab.h View 3 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab.cc View 1 14 chunks +65 lines, -89 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_strip.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_strip.cc View 1 2 4 chunks +9 lines, -17 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_unittest.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M ui/gfx/animation/multi_animation.h View 1 1 chunk +5 lines, -4 lines 0 comments Download
M ui/gfx/animation/multi_animation_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M ui/views/controls/glow_hover_controller.cc View 4 chunks +7 lines, -7 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 15 (7 generated)
Peter Kasting
4 years, 10 months ago (2016-02-19 00:16:43 UTC) #3
sky
LGTM https://codereview.chromium.org/1710253003/diff/1/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/1710253003/diff/1/chrome/browser/ui/views/tabs/tab.cc#newcode642 chrome/browser/ui/views/tabs/tab.cc:642: crash_icon_animation_->Stop(); Indenting is off here (looks like it ...
4 years, 10 months ago (2016-02-19 05:01:05 UTC) #4
Peter Kasting
https://codereview.chromium.org/1710253003/diff/1/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/1710253003/diff/1/chrome/browser/ui/views/tabs/tab.cc#newcode642 chrome/browser/ui/views/tabs/tab.cc:642: crash_icon_animation_->Stop(); On 2016/02/19 05:01:04, sky wrote: > Indenting is ...
4 years, 10 months ago (2016-02-22 07:39:05 UTC) #5
sky
https://codereview.chromium.org/1710253003/diff/1/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/1710253003/diff/1/chrome/browser/ui/views/tabs/tab.cc#newcode642 chrome/browser/ui/views/tabs/tab.cc:642: crash_icon_animation_->Stop(); On 2016/02/22 07:39:05, Peter Kasting wrote: > On ...
4 years, 10 months ago (2016-02-22 16:42:09 UTC) #6
Peter Kasting
https://codereview.chromium.org/1710253003/diff/1/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/1710253003/diff/1/chrome/browser/ui/views/tabs/tab.cc#newcode642 chrome/browser/ui/views/tabs/tab.cc:642: crash_icon_animation_->Stop(); On 2016/02/22 16:42:08, sky wrote: > On 2016/02/22 ...
4 years, 10 months ago (2016-02-24 12:24:49 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1710253003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1710253003/40001
4 years, 10 months ago (2016-02-24 12:25:31 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-24 13:39:23 UTC) #13
commit-bot: I haz the power
4 years, 10 months ago (2016-02-24 13:40:21 UTC) #15
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/158f43592244183d9f8e2666b27e3637fa1dfc21
Cr-Commit-Position: refs/heads/master@{#377281}

Powered by Google App Engine
This is Rietveld 408576698