| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_DELEGATE_H_ | |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_DELEGATE_H_ | |
| 7 | |
| 8 namespace views { | |
| 9 | |
| 10 class MenuItemView; | |
| 11 | |
| 12 // This is internal as there should be no need for usage of this class outside | |
| 13 // of views. | |
| 14 namespace internal { | |
| 15 | |
| 16 // Used by MenuController to notify of interesting events that are intended for | |
| 17 // the class using MenuController. This is implemented by MenuRunnerImpl. | |
| 18 class MenuControllerDelegate { | |
| 19 public: | |
| 20 enum NotifyType { | |
| 21 NOTIFY_DELEGATE, | |
| 22 DONT_NOTIFY_DELEGATE | |
| 23 }; | |
| 24 | |
| 25 // Invoked when MenuController closes a menu and the MenuController was | |
| 26 // configured for drop (MenuRunner::FOR_DROP). | |
| 27 virtual void DropMenuClosed(NotifyType type, MenuItemView* menu) = 0; | |
| 28 | |
| 29 // Invoked when the MenuDelegate::GetSiblingMenu() returns non-NULL. | |
| 30 virtual void SiblingMenuCreated(MenuItemView* menu) = 0; | |
| 31 | |
| 32 protected: | |
| 33 virtual ~MenuControllerDelegate() {} | |
| 34 }; | |
| 35 | |
| 36 } // namespace internal | |
| 37 | |
| 38 } // namespace view | |
| 39 | |
| 40 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_DELEGATE_H_ | |
| OLD | NEW |