| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_MENU_ITEMS_CHANGED_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_MENU_ITEMS_CHANGED_DELEGATE_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" |
| 12 |
| 13 namespace ui { |
| 14 class MenuModel; |
| 15 }; |
| 16 |
| 17 namespace views { |
| 18 class MenuItemView; |
| 19 }; |
| 20 |
| 21 // Interface for ui::MenuModelDelegate to communicate with views::MenuDelegate |
| 22 // when menu items changed. |
| 23 class MenuItemsChangedDelegate { |
| 24 public: |
| 25 virtual void OnItemAdded(views::MenuItemView* parent, int menu_index, |
| 26 ui::MenuModel* model, int model_index, |
| 27 int item_id) = 0; |
| 28 virtual void OnItemRemoved(views::MenuItemView* parent, int menu_index, |
| 29 int item_id) = 0; |
| 30 |
| 31 virtual void UpdateMapOfMenuItemIdAndModel( |
| 32 ui::MenuModel* model, |
| 33 std::vector<int>& item_ids) = 0; |
| 34 |
| 35 protected: |
| 36 virtual ~MenuItemsChangedDelegate() {} |
| 37 }; |
| 38 |
| 39 #endif // CHROME_BROWSER_UI_VIEWS_MENU_ITEMS_CHANGED_DELEGATE_H_ |
| OLD | NEW |