| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SPELLING_MENU_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLING_MENU_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/prefs/pref_member.h" | 12 #include "base/prefs/pref_member.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
| 15 #include "chrome/browser/renderer_context_menu/render_view_context_menu_observer
.h" |
| 15 #include "chrome/browser/spellchecker/spelling_service_client.h" | 16 #include "chrome/browser/spellchecker/spelling_service_client.h" |
| 16 #include "chrome/browser/tab_contents/render_view_context_menu_observer.h" | |
| 17 | 17 |
| 18 class RenderViewContextMenuProxy; | 18 class RenderViewContextMenuProxy; |
| 19 struct SpellCheckResult; | 19 struct SpellCheckResult; |
| 20 | 20 |
| 21 // An observer that listens to events from the RenderViewContextMenu class and | 21 // An observer that listens to events from the RenderViewContextMenu class and |
| 22 // shows suggestions from the Spelling ("do you mean") service to a context menu | 22 // shows suggestions from the Spelling ("do you mean") service to a context menu |
| 23 // while we show it. This class implements two interfaces: | 23 // while we show it. This class implements two interfaces: |
| 24 // * RenderViewContextMenuObserver | 24 // * RenderViewContextMenuObserver |
| 25 // This interface is used for adding a menu item and update it while showing. | 25 // This interface is used for adding a menu item and update it while showing. |
| 26 // * net::URLFetcherDelegate | 26 // * net::URLFetcherDelegate |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // this variable is true and we right-click a misspelled word, we send a | 110 // this variable is true and we right-click a misspelled word, we send a |
| 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_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ | 120 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_SPELLING_MENU_OBSERVER_H_ |
| OLD | NEW |