Chromium Code Reviews| 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 CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLCHECKER_SUBMENU_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLCHECKER_SUBMENU_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLCHECKER_SUBMENU_OBSERVER_H_ | 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLCHECKER_SUBMENU_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <set> | |
| 8 #include <string> | 9 #include <string> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 13 #include "components/renderer_context_menu/render_view_context_menu_observer.h" | 14 #include "components/renderer_context_menu/render_view_context_menu_observer.h" |
| 14 #include "ui/base/models/simple_menu_model.h" | 15 #include "ui/base/models/simple_menu_model.h" |
| 15 | 16 |
| 17 class PrefService; | |
| 16 class RenderViewContextMenuProxy; | 18 class RenderViewContextMenuProxy; |
| 17 | 19 |
| 18 // A class that implements the 'spell-checker options' submenu. This class | 20 // A class that implements the 'spell-checker options' submenu. This class |
| 19 // creates the submenu, add it to the parent menu, and handles events. | 21 // creates the submenu, add it to the parent menu, and handles events. |
| 20 class SpellCheckerSubMenuObserver : public RenderViewContextMenuObserver { | 22 class SpellCheckerSubMenuObserver : public RenderViewContextMenuObserver { |
| 21 public: | 23 public: |
| 22 SpellCheckerSubMenuObserver(RenderViewContextMenuProxy* proxy, | 24 SpellCheckerSubMenuObserver(RenderViewContextMenuProxy* proxy, |
| 23 ui::SimpleMenuModel::Delegate* delegate, | 25 ui::SimpleMenuModel::Delegate* delegate, |
| 24 int group); | 26 int group); |
| 25 virtual ~SpellCheckerSubMenuObserver(); | 27 virtual ~SpellCheckerSubMenuObserver(); |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 36 RenderViewContextMenuProxy* proxy_; | 38 RenderViewContextMenuProxy* proxy_; |
| 37 | 39 |
| 38 // The submenu of the 'spell-checker options'. This class adds items to this | 40 // The submenu of the 'spell-checker options'. This class adds items to this |
| 39 // submenu and add it to the parent menu. | 41 // submenu and add it to the parent menu. |
| 40 ui::SimpleMenuModel submenu_model_; | 42 ui::SimpleMenuModel submenu_model_; |
| 41 | 43 |
| 42 #if !defined(OS_MACOSX) | 44 #if !defined(OS_MACOSX) |
| 43 // Hunspell spelling submenu. | 45 // Hunspell spelling submenu. |
| 44 // The radio items representing languages available for spellchecking. | 46 // The radio items representing languages available for spellchecking. |
| 45 int language_group_; | 47 int language_group_; |
| 46 int language_selected_; | 48 std::set<int> languages_selected_; |
| 47 std::vector<std::string> languages_; | 49 std::vector<std::string> languages_; |
|
please use gerrit instead
2014/11/07 16:24:49
Please add comments for all three variables and th
Klemen Forstnerič
2014/11/11 21:52:01
Acknowledged.
| |
| 48 #endif // !OS_MACOSX | 50 #endif // !OS_MACOSX |
| 49 | 51 |
| 50 DISALLOW_COPY_AND_ASSIGN(SpellCheckerSubMenuObserver); | 52 DISALLOW_COPY_AND_ASSIGN(SpellCheckerSubMenuObserver); |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLCHECKER_SUBMENU_OBSERVER_H_ | 55 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLCHECKER_SUBMENU_OBSERVER_H_ |
| OLD | NEW |