summaryrefslogtreecommitdiffstats
path: root/ui/views/controls/button/image_button.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/views/controls/button/image_button.h')
-rw-r--r--ui/views/controls/button/image_button.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/ui/views/controls/button/image_button.h b/ui/views/controls/button/image_button.h
index f4260ca..3085869 100644
--- a/ui/views/controls/button/image_button.h
+++ b/ui/views/controls/button/image_button.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,6 +6,7 @@
#define UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_
#pragma once
+#include "base/gtest_prod_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/views/controls/button/custom_button.h"
@@ -30,6 +31,10 @@ class VIEWS_EXPORT ImageButton : public CustomButton {
const SkBitmap* image,
const SkBitmap* mask);
+ // Set an |image| to draw on top of the normal / hot / pushed image.
+ // Pass NULL for no image.
+ void SetOverlayImage(const SkBitmap* image);
+
enum HorizontalAlignment { ALIGN_LEFT = 0,
ALIGN_CENTER,
ALIGN_RIGHT, };
@@ -63,7 +68,12 @@ class VIEWS_EXPORT ImageButton : public CustomButton {
// The background image.
SkBitmap background_image_;
+ // Image to draw on top of normal / hot / pushed image. Usually empty.
+ SkBitmap overlay_image_;
+
private:
+ FRIEND_TEST_ALL_PREFIXES(ImageButtonTest, Basics);
+
// Image alignment.
HorizontalAlignment h_alignment_;
VerticalAlignment v_alignment_;