Index: chrome/browser/ui/views/action_box_menu_item_view.cc |
diff --git a/chrome/browser/ui/views/action_box_menu_item_view.cc b/chrome/browser/ui/views/action_box_menu_item_view.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..379e5b1a7184ce3fc48a67ee00dc4b3c599e056a |
--- /dev/null |
+++ b/chrome/browser/ui/views/action_box_menu_item_view.cc |
@@ -0,0 +1,39 @@ |
+// 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. |
+ |
+#include "chrome/browser/ui/views/action_box_menu_item_view.h" |
+ |
+// ActionBoxMenuItemView ------------------------------------------------------- |
+ |
+ActionBoxMenuItemView::ActionBoxMenuItemView(views::MenuDelegate* delegate) |
+ : views::MenuItemView(delegate) { |
+} |
+ |
+void ActionBoxMenuItemView::Layout() { |
+ MenuItemView::Layout(); |
Aaron Boodman
2012/06/12 05:53:44
I think the child layout is unnecessary since we'r
yefimt
2012/06/13 01:24:21
Not sure it is true, we layout only icon view, and
|
+ if (!has_children()) |
+ return; |
+ |
+ View* child = child_at(0); |
+ gfx::Size size = child->GetPreferredSize(); |
Aaron Boodman
2012/06/12 05:53:44
child->SetPosition(Position(0, 0));
child->SizeToP
yefimt
2012/06/13 01:24:21
Done.
|
+ child->SetBounds(0, 0, size.width(), size.height()); |
+} |
+ |
+ActionBoxMenuItemView::ActionBoxMenuItemView(MenuItemView* parent, |
+ int command, |
+ MenuItemView::Type type) |
+ : MenuItemView(parent, command, type) { |
+} |
+ |
+ActionBoxMenuItemView::~ActionBoxMenuItemView() { |
+} |
+ |
+void ActionBoxMenuItemView::OnPaint(gfx::Canvas* canvas) { |
+ MenuItemView::OnPaint(canvas); |
Aaron Boodman
2012/06/12 05:53:44
No need to override?
yefimt
2012/06/13 01:24:21
Yes, removed it after it was uploaded
On 2012/06/1
|
+} |
+ |
+views::MenuItemView* ActionBoxMenuItemView::AllocateMenuItemView( |
+ views::MenuItemView* parent, int item_id, Type type) { |
+ return new ActionBoxMenuItemView(parent, item_id, type); |
+} |