Home | History | Annotate | Download | only in infobars
      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_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 class SkBitmap;
     12 namespace gfx {
     13 class Canvas;
     14 }
     15 namespace views {
     16 class View;
     17 }
     18 
     19 // A TextButtonBorder that is dark and also paints the button frame in the
     20 // normal state.
     21 class InfoBarButtonBorder : public views::Border {
     22  public:
     23   InfoBarButtonBorder();
     24 
     25  private:
     26   virtual ~InfoBarButtonBorder();
     27 
     28   // views::Border:
     29   virtual void GetInsets(gfx::Insets* insets) const;
     30   virtual void Paint(const views::View& view, gfx::Canvas* canvas) const;
     31 
     32   struct MBBImageSet {
     33     SkBitmap* top_left;
     34     SkBitmap* top;
     35     SkBitmap* top_right;
     36     SkBitmap* left;
     37     SkBitmap* center;
     38     SkBitmap* right;
     39     SkBitmap* bottom_left;
     40     SkBitmap* bottom;
     41     SkBitmap* bottom_right;
     42   };
     43 
     44   MBBImageSet normal_set_;
     45   MBBImageSet hot_set_;
     46   MBBImageSet pushed_set_;
     47 
     48   DISALLOW_COPY_AND_ASSIGN(InfoBarButtonBorder);
     49 };
     50 
     51 #endif  // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BUTTON_BORDER_H_
     52