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 Review URL: https://codereview.chromium.org/16209002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202978 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment