infobar_button_border.h revision 4a5e2dc747d50c653511c68ccb2cfbfb740bd5a7
1// Copyright (c) 2010 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_BUTTON_BORDER_H_ 6#define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BUTTON_BORDER_H_ 7#pragma once 8 9#include "views/border.h" 10 11#include "third_party/skia/include/core/SkBitmap.h" 12 13namespace gfx { 14class Canvas; 15} 16namespace views { 17class View; 18} 19 20// A TextButtonBorder that is dark and also paints the button frame in the 21// normal state. 22 23class InfoBarButtonBorder : public views::Border { 24 public: 25 InfoBarButtonBorder(); 26 virtual ~InfoBarButtonBorder(); 27 28 // Overriden from Border: 29 virtual void GetInsets(gfx::Insets* insets) const; 30 virtual void Paint(const views::View& view, gfx::Canvas* canvas) const; 31 32 private: 33 // Images 34 struct MBBImageSet { 35 SkBitmap* top_left; 36 SkBitmap* top; 37 SkBitmap* top_right; 38 SkBitmap* left; 39 SkBitmap* center; 40 SkBitmap* right; 41 SkBitmap* bottom_left; 42 SkBitmap* bottom; 43 SkBitmap* bottom_right; 44 }; 45 46 MBBImageSet normal_set_; 47 MBBImageSet hot_set_; 48 MBBImageSet pushed_set_; 49 50 DISALLOW_COPY_AND_ASSIGN(InfoBarButtonBorder); 51}; 52 53#endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BUTTON_BORDER_H_ 54