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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.h

Issue 8363042: Refactor the "spell-checker options" submenu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/render_view_context_menu.h
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.h (revision 107513)
+++ chrome/browser/tab_contents/render_view_context_menu.h (working copy)
@@ -27,6 +27,7 @@
class RenderViewHost;
class TabContents;
class SpellingMenuObserver;
+class SpellCheckerSubMenuObserver;
namespace gfx {
class Point;
@@ -91,6 +92,11 @@
// Add a menu item to a context menu.
virtual void AddMenuItem(int command_id, const string16& title) = 0;
+ // Add a submenu item to a context menu.
+ virtual void AddSubMenu(int command_id,
+ const string16& label,
+ ui::MenuModel* model) = 0;
+
// Update the status and text of the specified context-menu item.
virtual void UpdateMenuItem(int command_id,
bool enabled,
@@ -130,12 +136,15 @@
// RenderViewContextMenuDelegate implementation.
virtual void AddMenuItem(int command_id, const string16& title) OVERRIDE;
+ virtual void AddSubMenu(int command_id,
+ const string16& label,
+ ui::MenuModel* model) OVERRIDE;
virtual void UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
const string16& title) OVERRIDE;
- virtual RenderViewHost* GetRenderViewHost() const;
- virtual Profile* GetProfile() const;
+ virtual RenderViewHost* GetRenderViewHost() const OVERRIDE;
+ virtual Profile* GetProfile() const OVERRIDE;
protected:
void InitMenu();
@@ -245,16 +254,18 @@
// a text selection.
GURL selection_navigation_url_;
- ui::SimpleMenuModel spellcheck_submenu_model_;
ui::SimpleMenuModel speech_input_submenu_model_;
ui::SimpleMenuModel bidi_submenu_model_;
ui::SimpleMenuModel protocol_handler_submenu_model_;
ScopedVector<ui::SimpleMenuModel> extension_menu_models_;
scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_;
- // An observer that handles a spelling-menu items.
+ // An observer that handles spelling-menu items.
scoped_ptr<SpellingMenuObserver> spelling_menu_observer_;
+ // An observer that handles a 'spell-cheker options' submenu.
Avi (use Gerrit) 2011/10/27 12:40:03 s/cheker/checker/
Hironori Bono 2011/10/28 07:14:09 Done.
+ scoped_ptr<SpellCheckerSubMenuObserver> spellchecker_submenu_observer_;
+
// Our observers.
mutable ObserverList<RenderViewContextMenuObserver> observers_;

Powered by Google App Engine
This is Rietveld 408576698