| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 virtual ~BookmarkContextMenuController(); | 53 virtual ~BookmarkContextMenuController(); |
| 54 | 54 |
| 55 void BuildMenu(); | 55 void BuildMenu(); |
| 56 | 56 |
| 57 menus::SimpleMenuModel* menu_model() const { return menu_model_.get(); } | 57 menus::SimpleMenuModel* menu_model() const { return menu_model_.get(); } |
| 58 | 58 |
| 59 // menus::SimpleMenuModel::Delegate implementation: | 59 // menus::SimpleMenuModel::Delegate implementation: |
| 60 virtual bool IsCommandIdChecked(int command_id) const; | 60 virtual bool IsCommandIdChecked(int command_id) const; |
| 61 virtual bool IsCommandIdEnabled(int command_id) const; | 61 virtual bool IsCommandIdEnabled(int command_id) const; |
| 62 virtual bool GetAcceleratorForCommandId(int command_id, | 62 virtual bool GetAcceleratorForCommandId(int command_id, |
| 63 menus::Accelerator* accelerator) { | 63 menus::Accelerator* accelerator); |
| 64 return false; | |
| 65 } | |
| 66 virtual void ExecuteCommand(int command_id); | 64 virtual void ExecuteCommand(int command_id); |
| 67 | 65 |
| 68 // Accessors: | 66 // Accessors: |
| 69 Profile* profile() const { return profile_; } | 67 Profile* profile() const { return profile_; } |
| 70 PageNavigator* navigator() const { return navigator_; } | 68 PageNavigator* navigator() const { return navigator_; } |
| 71 | 69 |
| 72 private: | 70 private: |
| 73 // Adds a IDC_* style command to the menu with a localized string. | 71 // Adds a IDC_* style command to the menu with a localized string. |
| 74 void AddItem(int id, int localization_id); | 72 void AddItem(int id, int localization_id); |
| 75 // Adds a separator to the menu. | 73 // Adds a separator to the menu. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 90 PageNavigator* navigator_; | 88 PageNavigator* navigator_; |
| 91 const BookmarkNode* parent_; | 89 const BookmarkNode* parent_; |
| 92 std::vector<const BookmarkNode*> selection_; | 90 std::vector<const BookmarkNode*> selection_; |
| 93 BookmarkModel* model_; | 91 BookmarkModel* model_; |
| 94 scoped_ptr<menus::SimpleMenuModel> menu_model_; | 92 scoped_ptr<menus::SimpleMenuModel> menu_model_; |
| 95 | 93 |
| 96 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuController); | 94 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuController); |
| 97 }; | 95 }; |
| 98 | 96 |
| 99 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ | 97 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_CONTROLLER_H_ |
| OLD | NEW |