Home | History | Annotate | Download | only in launcher
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef ASH_LAUNCHER_OVERFLOW_BUTTON_H_
      6 #define ASH_LAUNCHER_OVERFLOW_BUTTON_H_
      7 
      8 #include "ash/shelf/shelf_types.h"
      9 #include "base/basictypes.h"
     10 #include "base/compiler_specific.h"
     11 #include "ui/gfx/image/image_skia.h"
     12 #include "ui/views/controls/button/custom_button.h"
     13 
     14 namespace ash {
     15 namespace internal {
     16 
     17 // Launcher overflow chevron button.
     18 class OverflowButton : public views::CustomButton {
     19  public:
     20   explicit OverflowButton(views::ButtonListener* listener);
     21   virtual ~OverflowButton();
     22 
     23   void OnShelfAlignmentChanged();
     24 
     25  private:
     26   void PaintBackground(gfx::Canvas* canvas, int alpha);
     27 
     28   // views::View overrides:
     29   virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
     30 
     31   // Left and right images are rotations of bottom_image and are
     32   // owned by the overflow button.
     33   gfx::ImageSkia left_image_;
     34   gfx::ImageSkia right_image_;
     35   // Bottom image is owned by the resource bundle.
     36   const gfx::ImageSkia* bottom_image_;
     37 
     38   DISALLOW_COPY_AND_ASSIGN(OverflowButton);
     39 };
     40 
     41 }  // namespace internal
     42 }  // namespace ash
     43 
     44 #endif  // ASH_LAUNCHER_OVERFLOW_BUTTON_H_
     45