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_SPELLING_MENU_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLING_MENU_OBSERVER_H_ |
6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLING_MENU_OBSERVER_H_ | 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLING_MENU_OBSERVER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // if (spelling_menu_observer_.get()) | 36 // if (spelling_menu_observer_.get()) |
37 // observers_.AddObserver(spelling_menu_observer.get()); | 37 // observers_.AddObserver(spelling_menu_observer.get()); |
38 // } | 38 // } |
39 // | 39 // |
40 class SpellingMenuObserver : public RenderViewContextMenuObserver { | 40 class SpellingMenuObserver : public RenderViewContextMenuObserver { |
41 public: | 41 public: |
42 explicit SpellingMenuObserver(RenderViewContextMenuProxy* proxy); | 42 explicit SpellingMenuObserver(RenderViewContextMenuProxy* proxy); |
43 virtual ~SpellingMenuObserver(); | 43 virtual ~SpellingMenuObserver(); |
44 | 44 |
45 // RenderViewContextMenuObserver implementation. | 45 // RenderViewContextMenuObserver implementation. |
46 virtual void InitMenu(const content::ContextMenuParams& params) OVERRIDE; | 46 virtual void InitMenu(const content::ContextMenuParams& params) override; |
47 virtual bool IsCommandIdSupported(int command_id) OVERRIDE; | 47 virtual bool IsCommandIdSupported(int command_id) override; |
48 virtual bool IsCommandIdChecked(int command_id) OVERRIDE; | 48 virtual bool IsCommandIdChecked(int command_id) override; |
49 virtual bool IsCommandIdEnabled(int command_id) OVERRIDE; | 49 virtual bool IsCommandIdEnabled(int command_id) override; |
50 virtual void ExecuteCommand(int command_id) OVERRIDE; | 50 virtual void ExecuteCommand(int command_id) override; |
51 virtual void OnMenuCancel() OVERRIDE; | 51 virtual void OnMenuCancel() override; |
52 | 52 |
53 // A callback function called when the Spelling service finishes checking a | 53 // A callback function called when the Spelling service finishes checking a |
54 // misspelled word. | 54 // misspelled word. |
55 void OnTextCheckComplete( | 55 void OnTextCheckComplete( |
56 SpellingServiceClient::ServiceType type, | 56 SpellingServiceClient::ServiceType type, |
57 bool success, | 57 bool success, |
58 const base::string16& text, | 58 const base::string16& text, |
59 const std::vector<SpellCheckResult>& results); | 59 const std::vector<SpellCheckResult>& results); |
60 | 60 |
61 private: | 61 private: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // JSON-RPC request to the service and retrieve suggestions. | 111 // JSON-RPC request to the service and retrieve suggestions. |
112 BooleanPrefMember integrate_spelling_service_; | 112 BooleanPrefMember integrate_spelling_service_; |
113 | 113 |
114 // Flag indicating whether automatic spelling correction is enabled. | 114 // Flag indicating whether automatic spelling correction is enabled. |
115 BooleanPrefMember autocorrect_spelling_; | 115 BooleanPrefMember autocorrect_spelling_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(SpellingMenuObserver); | 117 DISALLOW_COPY_AND_ASSIGN(SpellingMenuObserver); |
118 }; | 118 }; |
119 | 119 |
120 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLING_MENU_OBSERVER_H_ | 120 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLING_MENU_OBSERVER_H_ |
OLD | NEW |