summaryrefslogtreecommitdiffstats
path: root/ash/launcher/overflow_button.h
blob: be24ba61575444aa3a194e5176a473361db149ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_LAUNCHER_OVERFLOW_BUTTON_H_
#define ASH_LAUNCHER_OVERFLOW_BUTTON_H_

#include "ash/shelf_types.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/views/controls/button/custom_button.h"

namespace gfx {
class ImageSkia;
}

namespace ash {
namespace internal {

// Launcher overflow chevron button.
class OverflowButton : public views::CustomButton {
 public:
  explicit OverflowButton(views::ButtonListener* listener);
  virtual ~OverflowButton();

  void SetShelfAlignment(ShelfAlignment alignment);

 private:
  void PaintBackground(gfx::Canvas* canvas, int alpha);

  // views::View overrides:
  virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;

  ShelfAlignment alignment_;
  const gfx::ImageSkia* image_;

  DISALLOW_COPY_AND_ASSIGN(OverflowButton);
};

}  // namespace internal
}  // namespace ash

#endif  // ASH_LAUNCHER_OVERFLOW_BUTTON_H_