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

Unified Diff: mash/wm/frame/caption_buttons/frame_caption_button.cc

Issue 1534303002: CustomButton cleanup: make protected members private, create accessors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dont move declaration randomly Created 5 years 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/toolbar/toolbar_button.cc ('k') | ui/app_list/views/app_list_item_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/frame/caption_buttons/frame_caption_button.cc
diff --git a/mash/wm/frame/caption_buttons/frame_caption_button.cc b/mash/wm/frame/caption_buttons/frame_caption_button.cc
index ca1501fb082e74b86ec44fadc29d59d1ae92283e..491829fe582a10609eeac4613b507e1db839b781 100644
--- a/mash/wm/frame/caption_buttons/frame_caption_button.cc
+++ b/mash/wm/frame/caption_buttons/frame_caption_button.cc
@@ -111,11 +111,9 @@ const char* FrameCaptionButton::GetClassName() const {
}
void FrameCaptionButton::OnPaint(gfx::Canvas* canvas) {
- if (hover_animation_->is_animating() || state() == STATE_HOVERED) {
+ if (hover_animation().is_animating() || state() == STATE_HOVERED) {
int hovered_background_alpha =
- hover_animation_->is_animating()
- ? hover_animation_->CurrentValueBetween(0, 255)
- : 255;
+ hover_animation().CurrentValueBetween(0, 255);
SkPaint paint;
paint.setAlpha(hovered_background_alpha);
canvas->DrawImageInt(hovered_background_image_, 0, 0, paint);
@@ -176,9 +174,9 @@ void FrameCaptionButton::PaintCentered(gfx::Canvas* canvas,
if (!paint_as_active_) {
// Paint icons as active when they are hovered over or pressed.
double inactive_alpha = kInactiveIconAlpha;
- if (hover_animation_->is_animating()) {
+ if (hover_animation().is_animating()) {
inactive_alpha =
- hover_animation_->CurrentValueBetween(inactive_alpha, 1.0f);
+ hover_animation().CurrentValueBetween(inactive_alpha, 1.0f);
} else if (state() == STATE_PRESSED || state() == STATE_HOVERED) {
inactive_alpha = 1.0f;
}
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_button.cc ('k') | ui/app_list/views/app_list_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698