diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/ui/views/button_dropdown_test.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/views/toolbar_view.cc | 9 | ||||
-rw-r--r-- | chrome/browser/ui/views/toolbar_view.h | 3 |
3 files changed, 4 insertions, 12 deletions
diff --git a/chrome/browser/ui/views/button_dropdown_test.cc b/chrome/browser/ui/views/button_dropdown_test.cc index 4defa09..14a9f9b 100644 --- a/chrome/browser/ui/views/button_dropdown_test.cc +++ b/chrome/browser/ui/views/button_dropdown_test.cc @@ -15,7 +15,6 @@ class ButtonDropDownDragTest : public ViewEventTestBase, public: ButtonDropDownDragTest() : button_(NULL), - ALLOW_THIS_IN_INITIALIZER_LIST(menu_model_(this)), menu_shown_(false), menu_closed_(false) { } @@ -25,7 +24,7 @@ class ButtonDropDownDragTest : public ViewEventTestBase, // ViewEventTestBase implementation. virtual void SetUp() OVERRIDE { - button_ = new views::ButtonDropDown(NULL, &menu_model_); + button_ = new views::ButtonDropDown(NULL, new ui::SimpleMenuModel(this)); ViewEventTestBase::SetUp(); } @@ -125,7 +124,6 @@ class ButtonDropDownDragTest : public ViewEventTestBase, private: views::ButtonDropDown* button_; - ui::SimpleMenuModel menu_model_; bool menu_shown_; bool menu_closed_; }; diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc index 82979b39..5e6e927 100644 --- a/chrome/browser/ui/views/toolbar_view.cc +++ b/chrome/browser/ui/views/toolbar_view.cc @@ -220,12 +220,8 @@ ToolbarView::~ToolbarView() { void ToolbarView::Init(views::View* location_bar_parent, views::View* popup_parent_view) { - back_menu_model_.reset(new BackForwardMenuModel( + back_ = new views::ButtonDropDown(this, new BackForwardMenuModel( browser_, BackForwardMenuModel::BACKWARD_MENU)); - forward_menu_model_.reset(new BackForwardMenuModel( - browser_, BackForwardMenuModel::FORWARD_MENU)); - - back_ = new views::ButtonDropDown(this, back_menu_model_.get()); back_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON); back_->set_tag(IDC_BACK); @@ -235,7 +231,8 @@ void ToolbarView::Init(views::View* location_bar_parent, back_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK)); back_->set_id(VIEW_ID_BACK_BUTTON); - forward_ = new views::ButtonDropDown(this, forward_menu_model_.get()); + forward_ = new views::ButtonDropDown(this, new BackForwardMenuModel( + browser_, BackForwardMenuModel::FORWARD_MENU)); forward_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON); forward_->set_tag(IDC_FORWARD); diff --git a/chrome/browser/ui/views/toolbar_view.h b/chrome/browser/ui/views/toolbar_view.h index 037efe5..0d68369 100644 --- a/chrome/browser/ui/views/toolbar_view.h +++ b/chrome/browser/ui/views/toolbar_view.h @@ -214,9 +214,6 @@ class ToolbarView : public views::AccessiblePaneView, // of |this|. void SetLocationBarContainerBounds(const gfx::Rect& bounds); - scoped_ptr<BackForwardMenuModel> back_menu_model_; - scoped_ptr<BackForwardMenuModel> forward_menu_model_; - // The model that contains the security level, text, icon to display... ToolbarModel* model_; |