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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_context_menu.h

Issue 423833002: Check if the delegate changed the visibility of child MenuItemViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added MenuModelAdapter::IsCommandVisible Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h" 9 #include "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h"
10 #include "ui/views/controls/menu/menu_delegate.h" 10 #include "ui/views/controls/menu/menu_delegate.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 observer_ = observer; 54 observer_ = observer;
55 } 55 }
56 56
57 // Sets the PageNavigator. 57 // Sets the PageNavigator.
58 void SetPageNavigator(content::PageNavigator* navigator); 58 void SetPageNavigator(content::PageNavigator* navigator);
59 59
60 // Overridden from views::MenuDelegate: 60 // Overridden from views::MenuDelegate:
61 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; 61 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
62 virtual bool IsItemChecked(int command_id) const OVERRIDE; 62 virtual bool IsItemChecked(int command_id) const OVERRIDE;
63 virtual bool IsCommandEnabled(int command_id) const OVERRIDE; 63 virtual bool IsCommandEnabled(int command_id) const OVERRIDE;
64 virtual bool IsCommandVisible(int command_id) const OVERRIDE;
64 virtual bool ShouldCloseAllMenusOnExecute(int id) OVERRIDE; 65 virtual bool ShouldCloseAllMenusOnExecute(int id) OVERRIDE;
65 66
66 // Overridden from BookmarkContextMenuControllerDelegate: 67 // Overridden from BookmarkContextMenuControllerDelegate:
67 virtual void CloseMenu() OVERRIDE; 68 virtual void CloseMenu() OVERRIDE;
68 virtual void WillExecuteCommand( 69 virtual void WillExecuteCommand(
69 int command_id, 70 int command_id,
70 const std::vector<const BookmarkNode*>& bookmarks) OVERRIDE; 71 const std::vector<const BookmarkNode*>& bookmarks) OVERRIDE;
71 virtual void DidExecuteCommand(int command_id) OVERRIDE; 72 virtual void DidExecuteCommand(int command_id) OVERRIDE;
72 73
73 private: 74 private:
(...skipping 10 matching lines...) Expand all
84 85
85 BookmarkContextMenuObserver* observer_; 86 BookmarkContextMenuObserver* observer_;
86 87
87 // Should the menu close when a node is removed. 88 // Should the menu close when a node is removed.
88 bool close_on_remove_; 89 bool close_on_remove_;
89 90
90 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenu); 91 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenu);
91 }; 92 };
92 93
93 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ 94 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698