OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/api/infobars/infobar_delegate.h" | |
10 #include "ui/views/background.h" | 9 #include "ui/views/background.h" |
11 | 10 |
12 class InfoBarBackground : public views::Background { | 11 class InfoBarBackground : public views::Background { |
13 public: | 12 public: |
14 explicit InfoBarBackground(InfoBarDelegate::Type infobar_type); | 13 InfoBarBackground(SkColor top, SkColor bottom); |
15 virtual ~InfoBarBackground(); | 14 virtual ~InfoBarBackground(); |
16 | 15 |
17 void set_separator_color(SkColor color) { separator_color_ = color; } | 16 void set_separator_color(SkColor color) { separator_color_ = color; } |
18 | 17 |
19 private: | 18 private: |
20 // views::Background: | 19 // views::Background: |
21 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE; | 20 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE; |
22 | 21 |
23 SkColor separator_color_; | 22 SkColor separator_color_; |
24 SkColor top_color_; | 23 SkColor top_color_; |
25 SkColor bottom_color_; | 24 SkColor bottom_color_; |
26 | 25 |
27 DISALLOW_COPY_AND_ASSIGN(InfoBarBackground); | 26 DISALLOW_COPY_AND_ASSIGN(InfoBarBackground); |
28 }; | 27 }; |
29 | 28 |
30 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ | 29 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ |
OLD | NEW |