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_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ |
7 #pragma once | |
8 | 7 |
9 namespace content { | 8 namespace content { |
10 struct ContextMenuParams; | 9 struct ContextMenuParams; |
11 } | 10 } |
12 | 11 |
13 // The interface used for implementing context-menu items. The following | 12 // The interface used for implementing context-menu items. The following |
14 // instruction describe how to implement a context-menu item with this | 13 // instruction describe how to implement a context-menu item with this |
15 // interface. | 14 // interface. |
16 // | 15 // |
17 // 1. Add command IDs for the context-menu items to 'chrome_command_ids.h'. | 16 // 1. Add command IDs for the context-menu items to 'chrome_command_ids.h'. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // specified context-menu item. If we need to enable or disable a context-menu | 95 // specified context-menu item. If we need to enable or disable a context-menu |
97 // item while showing, use RenderViewContextMenuDelegate::UpdateMenuItem(). | 96 // item while showing, use RenderViewContextMenuDelegate::UpdateMenuItem(). |
98 virtual bool IsCommandIdChecked(int command_id); | 97 virtual bool IsCommandIdChecked(int command_id); |
99 virtual bool IsCommandIdEnabled(int command_id); | 98 virtual bool IsCommandIdEnabled(int command_id); |
100 | 99 |
101 // Called when a user selects the specified context-menu item. | 100 // Called when a user selects the specified context-menu item. |
102 virtual void ExecuteCommand(int command_id); | 101 virtual void ExecuteCommand(int command_id); |
103 }; | 102 }; |
104 | 103 |
105 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ | 104 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_OBSERVER_H_ |
OLD | NEW |