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

Side by Side Diff: ash/common/frame/default_header_painter.cc

Issue 2329433003: Revert of [ash-md] Fades overview header in and out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « ash/common/frame/default_header_painter.h ('k') | ash/common/frame/header_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
217 void DefaultHeaderPainter::UpdateLeftHeaderView(views::View* left_header_view) { 209 void DefaultHeaderPainter::UpdateLeftHeaderView(views::View* left_header_view) {
218 left_header_view_ = left_header_view; 210 left_header_view_ = left_header_view;
219 } 211 }
220 212
221 /////////////////////////////////////////////////////////////////////////////// 213 ///////////////////////////////////////////////////////////////////////////////
222 // gfx::AnimationDelegate overrides: 214 // gfx::AnimationDelegate overrides:
223 215
224 void DefaultHeaderPainter::AnimationProgressed( 216 void DefaultHeaderPainter::AnimationProgressed(
225 const gfx::Animation* animation) { 217 const gfx::Animation* animation) {
226 view_->SchedulePaintInRect(GetLocalBounds()); 218 view_->SchedulePaintInRect(GetLocalBounds());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 return HeaderPainterUtil::GetTitleBounds( 308 return HeaderPainterUtil::GetTitleBounds(
317 left_header_view_, caption_button_container_, GetTitleFontList()); 309 left_header_view_, caption_button_container_, GetTitleFontList());
318 } 310 }
319 311
320 bool DefaultHeaderPainter::UsesCustomFrameColors() const { 312 bool DefaultHeaderPainter::UsesCustomFrameColors() const {
321 return active_frame_color_ != kDefaultFrameColor || 313 return active_frame_color_ != kDefaultFrameColor ||
322 inactive_frame_color_ != kDefaultFrameColor; 314 inactive_frame_color_ != kDefaultFrameColor;
323 } 315 }
324 316
325 } // namespace ash 317 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/frame/default_header_painter.h ('k') | ash/common/frame/header_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698