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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ 7 #pragma once 8 9 #include "chrome/browser/tab_contents/infobar_delegate.h" 10 #include "views/background.h" 11 12 class InfoBarBackground : public views::Background { 13 public: 14 explicit InfoBarBackground(InfoBarDelegate::Type infobar_type); 15 virtual ~InfoBarBackground(); 16 set_separator_color(SkColor color)17 void set_separator_color(SkColor color) { separator_color_ = color; } 18 static SkColor GetTopColor(InfoBarDelegate::Type infobar_type); 19 static SkColor GetBottomColor(InfoBarDelegate::Type infobar_type); 20 21 private: 22 // views::Background: 23 virtual void Paint(gfx::Canvas* canvas, views::View* view) const; 24 25 SkColor separator_color_; 26 SkColor top_color_; 27 SkColor bottom_color_; 28 29 DISALLOW_COPY_AND_ASSIGN(InfoBarBackground); 30 }; 31 32 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ 33