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

Unified Diff: chrome/browser/views/bookmark_editor_view.h

Issue 122027: Remove the Menu object, converting all the remaining callers to use Menu2. I'... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « chrome/browser/views/bookmark_bar_view.h ('k') | chrome/browser/views/bookmark_editor_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/bookmark_editor_view.h
===================================================================
--- chrome/browser/views/bookmark_editor_view.h (revision 18306)
+++ chrome/browser/views/bookmark_editor_view.h (working copy)
@@ -11,7 +11,7 @@
#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "views/controls/button/button.h"
-#include "views/controls/menu/menu.h"
+#include "views/controls/menu/simple_menu_model.h"
#include "views/controls/textfield/textfield.h"
#include "views/controls/tree/tree_view.h"
#include "views/window/dialog_delegate.h"
@@ -40,7 +40,7 @@
public views::DialogDelegate,
public views::Textfield::Controller,
public views::ContextMenuController,
- public views::Menu::Delegate,
+ public views::SimpleMenuModel::Delegate,
public BookmarkModelObserver {
FRIEND_TEST(BookmarkEditorViewTest, ChangeParent);
FRIEND_TEST(BookmarkEditorViewTest, ChangeParentAndURL);
@@ -91,13 +91,13 @@
// NativeButton.
virtual void ButtonPressed(views::Button* sender);
- // Menu::Delegate method.
- virtual void ExecuteCommand(int id);
+ // SimpleMenuModel::Delegate.
+ virtual bool IsCommandIdChecked(int command_id) const;
+ virtual bool IsCommandIdEnabled(int command_id) const;
+ virtual bool GetAcceleratorForCommandId(int command_id,
+ views::Accelerator* accelerator);
+ virtual void ExecuteCommand(int command_id);
- // Menu::Delegate method, return false if id is edit and the bookmark node
- // was selected, true otherwise.
- virtual bool IsCommandEnabled(int id) const;
-
// Creates a Window and adds the BookmarkEditorView to it. When the window is
// closed the BookmarkEditorView is deleted.
void Show(HWND parent_hwnd);
@@ -244,7 +244,8 @@
BookmarkNode* node_;
// The context menu.
- scoped_ptr<views::Menu> context_menu_;
+ scoped_ptr<views::SimpleMenuModel> context_menu_contents_;
+ scoped_ptr<views::Menu2> context_menu_;
// Mode used to create nodes from.
BookmarkModel* bb_model_;
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.h ('k') | chrome/browser/views/bookmark_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698