| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/frame/default_header_painter.h" | 5 #include "ash/common/frame/default_header_painter.h" |
| 6 | 6 |
| 7 #include "ash/common/ash_layout_constants.h" | 7 #include "ash/common/ash_layout_constants.h" |
| 8 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h
" | 8 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h
" |
| 9 #include "ash/common/frame/header_painter_util.h" | 9 #include "ash/common/frame/header_painter_util.h" |
| 10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 view_->SchedulePaintInRect(GetTitleBounds()); | 199 view_->SchedulePaintInRect(GetTitleBounds()); |
| 200 } | 200 } |
| 201 | 201 |
| 202 void DefaultHeaderPainter::SetFrameColors(SkColor active_frame_color, | 202 void DefaultHeaderPainter::SetFrameColors(SkColor active_frame_color, |
| 203 SkColor inactive_frame_color) { | 203 SkColor inactive_frame_color) { |
| 204 active_frame_color_ = active_frame_color; | 204 active_frame_color_ = active_frame_color; |
| 205 inactive_frame_color_ = inactive_frame_color; | 205 inactive_frame_color_ = inactive_frame_color; |
| 206 UpdateAllButtonImages(); | 206 UpdateAllButtonImages(); |
| 207 } | 207 } |
| 208 | 208 |
| 209 SkColor DefaultHeaderPainter::GetActiveFrameColor() const { |
| 210 return active_frame_color_; |
| 211 } |
| 212 |
| 213 SkColor DefaultHeaderPainter::GetInactiveFrameColor() const { |
| 214 return inactive_frame_color_; |
| 215 } |
| 216 |
| 209 void DefaultHeaderPainter::UpdateLeftHeaderView(views::View* left_header_view) { | 217 void DefaultHeaderPainter::UpdateLeftHeaderView(views::View* left_header_view) { |
| 210 left_header_view_ = left_header_view; | 218 left_header_view_ = left_header_view; |
| 211 } | 219 } |
| 212 | 220 |
| 213 /////////////////////////////////////////////////////////////////////////////// | 221 /////////////////////////////////////////////////////////////////////////////// |
| 214 // gfx::AnimationDelegate overrides: | 222 // gfx::AnimationDelegate overrides: |
| 215 | 223 |
| 216 void DefaultHeaderPainter::AnimationProgressed( | 224 void DefaultHeaderPainter::AnimationProgressed( |
| 217 const gfx::Animation* animation) { | 225 const gfx::Animation* animation) { |
| 218 view_->SchedulePaintInRect(GetLocalBounds()); | 226 view_->SchedulePaintInRect(GetLocalBounds()); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 return HeaderPainterUtil::GetTitleBounds( | 316 return HeaderPainterUtil::GetTitleBounds( |
| 309 left_header_view_, caption_button_container_, GetTitleFontList()); | 317 left_header_view_, caption_button_container_, GetTitleFontList()); |
| 310 } | 318 } |
| 311 | 319 |
| 312 bool DefaultHeaderPainter::UsesCustomFrameColors() const { | 320 bool DefaultHeaderPainter::UsesCustomFrameColors() const { |
| 313 return active_frame_color_ != kDefaultFrameColor || | 321 return active_frame_color_ != kDefaultFrameColor || |
| 314 inactive_frame_color_ != kDefaultFrameColor; | 322 inactive_frame_color_ != kDefaultFrameColor; |
| 315 } | 323 } |
| 316 | 324 |
| 317 } // namespace ash | 325 } // namespace ash |
| OLD | NEW |