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

Unified Diff: chrome/browser/ui/views/wrench_menu.cc

Issue 11753018: Remove ScheduleAllView class from wrench_menu.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/wrench_menu.cc
diff --git a/chrome/browser/ui/views/wrench_menu.cc b/chrome/browser/ui/views/wrench_menu.cc
index bbebf140b3d7ae48f9b319e6885447b3696d549d..c39ce8a91cdd619b4fd318429f4d52dfecea04f2 100644
--- a/chrome/browser/ui/views/wrench_menu.cc
+++ b/chrome/browser/ui/views/wrench_menu.cc
@@ -295,24 +295,6 @@ class MenuButtonBackground : public views::Background {
DISALLOW_COPY_AND_ASSIGN(MenuButtonBackground);
};
-// A View subclass that forces SchedulePaint to paint all. Normally when the
-// mouse enters/exits a button the buttons invokes SchedulePaint. As part of the
-// button border (MenuButtonBackground) is rendered by the button to the
-// left/right of it SchedulePaint on the the button may not be enough, so this
-// forces a paint all.
-class ScheduleAllView : public views::View {
- public:
- ScheduleAllView() {}
-
- // Overridden from views::View.
- virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE {
- View::SchedulePaintInRect(gfx::Rect(0, 0, width(), height()));
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ScheduleAllView);
-};
-
string16 GetAccessibleNameForWrenchMenuItem(
MenuModel* model, int item_index, int accessible_string_id) {
string16 accessible_name = l10n_util::GetStringUTF16(accessible_string_id);
@@ -330,12 +312,22 @@ string16 GetAccessibleNameForWrenchMenuItem(
}
// WrenchMenuView is a view that can contain text buttons.
-class WrenchMenuView : public ScheduleAllView, public views::ButtonListener {
+class WrenchMenuView : public views::View,
+ public views::ButtonListener {
public:
WrenchMenuView(WrenchMenu* menu, MenuModel* menu_model)
: menu_(menu),
menu_model_(menu_model) {}
+ // Overridden from views::View.
+ virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE {
+ // Normally when the mouse enters/exits a button the buttons invokes
+ // SchedulePaint. As part of the button border (MenuButtonBackground) is
+ // rendered by the button to the left/right of it SchedulePaint on the the
+ // button may not be enough, so this forces a paint all.
+ View::SchedulePaintInRect(gfx::Rect(0, 0, width(), height()));
tfarina 2013/01/04 19:15:34 nit: gfx::Rect(size())
+ }
+
TextButton* CreateAndConfigureButton(int string_id,
MenuButtonBackground::ButtonType type,
int index,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698