| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ | 5 #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ |
| 6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ | 6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ |
| 7 | 7 |
| 8 namespace content { | 8 namespace content { |
| 9 struct ContextMenuParams; | 9 struct ContextMenuParams; |
| 10 } | 10 } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 virtual bool IsCommandIdSupported(int command_id); | 93 virtual bool IsCommandIdSupported(int command_id); |
| 94 | 94 |
| 95 // Called when the RenderViewContextMenu class sets the initial status of the | 95 // Called when the RenderViewContextMenu class sets the initial status of the |
| 96 // specified context-menu item. If we need to enable or disable a context-menu | 96 // specified context-menu item. If we need to enable or disable a context-menu |
| 97 // item while showing, use RenderViewContextMenuProxy::UpdateMenuItem(). | 97 // item while showing, use RenderViewContextMenuProxy::UpdateMenuItem(). |
| 98 virtual bool IsCommandIdChecked(int command_id); | 98 virtual bool IsCommandIdChecked(int command_id); |
| 99 virtual bool IsCommandIdEnabled(int command_id); | 99 virtual bool IsCommandIdEnabled(int command_id); |
| 100 | 100 |
| 101 // Called when a user selects the specified context-menu item. | 101 // Called when a user selects the specified context-menu item. |
| 102 virtual void ExecuteCommand(int command_id) {} | 102 virtual void ExecuteCommand(int command_id) {} |
| 103 | |
| 104 // Called when a user closes the context menu without selecting any items. | |
| 105 virtual void OnMenuCancel() {} | |
| 106 }; | 103 }; |
| 107 | 104 |
| 108 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ | 105 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ |
| OLD | NEW |