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

Issue 16209002: ContentSettingImageView cleanup, phase 2. (Closed)

Created:
7 years, 6 months ago by Peter Kasting
Modified:
7 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

ContentSettingImageView cleanup, phase 2. * Name/comment animation constants for clarity. Make constants used in multiple places in the class be private static members to scope them to the class (not really a big deal as there are no other classes in the .cc file). * Inline the calculations from GetTextAnimationSize() into GetPreferredSize() and nuke |visible_text_size_| as a result. * To enable the above change, add a background_showing() method to tell us when the background painter is being painted. This is basically equivalent to "are we animating", but also includes the "paused animation" state (during which the actual animation is technically reset). Then use this everywhere appropriate. This results in one functional change: if the content setting model changes our type while we're paused, we now just silently ignore it. This seems more correct, and I doubt this case can happen anyway. * Eliminate pointless arg to OnClick(). * Make |background_painter_| a pointer, which will be necessary when it switches to being an image grid painter. * Eliminate unnecessary #includes and a using directive. * Other changes to braces, newlines, variable names, code order, comments, etc. with the aim of clarity, brevity, and stylistic consistency. BUG=none TEST=none R=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202978

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -120 lines) Patch
M chrome/browser/ui/views/location_bar/content_setting_image_view.h View 3 chunks +14 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/location_bar/content_setting_image_view.cc View 8 chunks +78 lines, -115 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Peter Kasting
7 years, 6 months ago (2013-05-29 20:55:21 UTC) #1
sky
LGTM
7 years, 6 months ago (2013-05-29 21:09:22 UTC) #2
Peter Kasting
7 years, 6 months ago (2013-05-29 21:33:56 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 manually as r202978 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698