Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: ui/base/models/simple_menu_model.h

Issue 7492054: Don't send ViewMsg_ContextMenuClosed to the renderer process for submenus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | ui/base/models/simple_menu_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_ 5 #ifndef UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_
6 #define UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_ 6 #define UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual bool GetIconForCommandId(int command_id, SkBitmap* icon) const; 43 virtual bool GetIconForCommandId(int command_id, SkBitmap* icon) const;
44 44
45 // Notifies the delegate that the item with the specified command id was 45 // Notifies the delegate that the item with the specified command id was
46 // visually highlighted within the menu. 46 // visually highlighted within the menu.
47 virtual void CommandIdHighlighted(int command_id); 47 virtual void CommandIdHighlighted(int command_id);
48 48
49 // Performs the action associated with the specified command id. 49 // Performs the action associated with the specified command id.
50 virtual void ExecuteCommand(int command_id) = 0; 50 virtual void ExecuteCommand(int command_id) = 0;
51 51
52 // Notifies the delegate that the menu is about to show. 52 // Notifies the delegate that the menu is about to show.
53 virtual void MenuWillShow(); 53 virtual void MenuWillShow(SimpleMenuModel* source);
54 54
55 // Notifies the delegate that the menu has closed. 55 // Notifies the delegate that the menu has closed.
56 virtual void MenuClosed(); 56 virtual void MenuClosed(SimpleMenuModel* source);
57 57
58 protected: 58 protected:
59 virtual ~Delegate() {} 59 virtual ~Delegate() {}
60 }; 60 };
61 61
62 // The Delegate can be NULL, though if it is items can't be checked or 62 // The Delegate can be NULL, though if it is items can't be checked or
63 // disabled. 63 // disabled.
64 explicit SimpleMenuModel(Delegate* delegate); 64 explicit SimpleMenuModel(Delegate* delegate);
65 virtual ~SimpleMenuModel(); 65 virtual ~SimpleMenuModel();
66 66
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 MenuModelDelegate* menu_model_delegate_; 158 MenuModelDelegate* menu_model_delegate_;
159 159
160 ScopedRunnableMethodFactory<SimpleMenuModel> method_factory_; 160 ScopedRunnableMethodFactory<SimpleMenuModel> method_factory_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(SimpleMenuModel); 162 DISALLOW_COPY_AND_ASSIGN(SimpleMenuModel);
163 }; 163 };
164 164
165 } // namespace ui 165 } // namespace ui
166 166
167 #endif // UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_ 167 #endif // UI_BASE_MODELS_SIMPLE_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | ui/base/models/simple_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698