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

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_background.cc

Issue 10009024: Remove WAYLAND port (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/infobars/infobar_background.h" 5 #include "chrome/browser/ui/views/infobars/infobar_background.h"
6 6
7 #include "chrome/browser/infobars/infobar.h" 7 #include "chrome/browser/infobars/infobar.h"
8 #include "chrome/browser/ui/views/infobars/infobar_view.h" 8 #include "chrome/browser/ui/views/infobars/infobar_view.h"
9 #include "third_party/skia/include/effects/SkGradientShader.h" 9 #include "third_party/skia/include/effects/SkGradientShader.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
11 #include "ui/gfx/canvas_skia_paint.h"
12 #include "ui/gfx/color_utils.h" 11 #include "ui/gfx/color_utils.h"
13 #include "ui/views/view.h" 12 #include "ui/views/view.h"
14 13
15 InfoBarBackground::InfoBarBackground(InfoBarDelegate::Type infobar_type) 14 InfoBarBackground::InfoBarBackground(InfoBarDelegate::Type infobar_type)
16 : separator_color_(SK_ColorBLACK), 15 : separator_color_(SK_ColorBLACK),
17 top_color_(GetInfoBarTopColor(infobar_type)), 16 top_color_(GetInfoBarTopColor(infobar_type)),
18 bottom_color_(GetInfoBarBottomColor(infobar_type)) { 17 bottom_color_(GetInfoBarBottomColor(infobar_type)) {
19 SetNativeControlColor( 18 SetNativeControlColor(
20 color_utils::AlphaBlend(top_color_, bottom_color_, 128)); 19 color_utils::AlphaBlend(top_color_, bottom_color_, 128));
21 } 20 }
(...skipping 28 matching lines...) Expand all
50 // lest we get weird color bleeding problems. 49 // lest we get weird color bleeding problems.
51 paint.setAntiAlias(true); 50 paint.setAntiAlias(true);
52 canvas_skia->drawPath(infobar->stroke_path(), paint); 51 canvas_skia->drawPath(infobar->stroke_path(), paint);
53 paint.setAntiAlias(false); 52 paint.setAntiAlias(false);
54 53
55 // Now draw the separator at the bottom. 54 // Now draw the separator at the bottom.
56 canvas->FillRect(gfx::Rect(0, view->height() - InfoBar::kSeparatorLineHeight, 55 canvas->FillRect(gfx::Rect(0, view->height() - InfoBar::kSeparatorLineHeight,
57 view->width(), InfoBar::kSeparatorLineHeight), 56 view->width(), InfoBar::kSeparatorLineHeight),
58 separator_color_); 57 separator_color_);
59 } 58 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system_key_event_listener.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698