Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Unified Diff: ui/views/controls/button/vector_icon_button.h

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: check details Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/button/vector_icon_button.h
diff --git a/ui/views/controls/button/vector_icon_button.h b/ui/views/controls/button/vector_icon_button.h
deleted file mode 100644
index 66f1b93864ec3820893f78adebaa62bc5a486472..0000000000000000000000000000000000000000
--- a/ui/views/controls/button/vector_icon_button.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2015 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 UI_VIEWS_CONTROLS_BUTTON_VECTOR_ICON_BUTTON_H_
-#define UI_VIEWS_CONTROLS_BUTTON_VECTOR_ICON_BUTTON_H_
-
-#include "base/macros.h"
-#include "ui/views/controls/button/image_button.h"
-
-namespace gfx {
-struct VectorIcon;
-enum class VectorIconId;
-}
-
-namespace views {
-
-class VectorIconButtonDelegate;
-
-// A button that has an image and no text, with the image defined by a vector
-// icon identifier.
-class VIEWS_EXPORT VectorIconButton : public views::ImageButton {
- public:
- explicit VectorIconButton(VectorIconButtonDelegate* delegate);
- ~VectorIconButton() override;
-
- // Sets the icon to display and provides a callback which should return the
- // text color from which to derive this icon's color.
- void SetIcon(const gfx::VectorIcon& icon);
-
- // views::ImageButton:
- void OnThemeChanged() override;
- void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
-
- private:
- // Performs the work common to both SetIcon() variants.
- void OnSetIcon();
-
- // Called when something may have affected the button's images or colors.
- void UpdateImagesAndColors();
-
- VectorIconButtonDelegate* delegate_;
- const gfx::VectorIcon* icon_;
-
- DISALLOW_COPY_AND_ASSIGN(VectorIconButton);
-};
-
-} // namespace views
-
-#endif // UI_VIEWS_CONTROLS_BUTTON_VECTOR_ICON_BUTTON_H_
« no previous file with comments | « ui/views/controls/button/image_button_factory_unittest.cc ('k') | ui/views/controls/button/vector_icon_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698