| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |