| 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_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // if (spelling_menu_observer_.get()) | 39 // if (spelling_menu_observer_.get()) |
| 40 // observers_.AddObserver(spelling_menu_observer.get()); | 40 // observers_.AddObserver(spelling_menu_observer.get()); |
| 41 // } | 41 // } |
| 42 // | 42 // |
| 43 class SpellingMenuObserver : public RenderViewContextMenuObserver { | 43 class SpellingMenuObserver : public RenderViewContextMenuObserver { |
| 44 public: | 44 public: |
| 45 explicit SpellingMenuObserver(RenderViewContextMenuProxy* proxy); | 45 explicit SpellingMenuObserver(RenderViewContextMenuProxy* proxy); |
| 46 virtual ~SpellingMenuObserver(); | 46 virtual ~SpellingMenuObserver(); |
| 47 | 47 |
| 48 // RenderViewContextMenuObserver implementation. | 48 // RenderViewContextMenuObserver implementation. |
| 49 virtual void InitMenu(const ContextMenuParams& params) OVERRIDE; | 49 virtual void InitMenu(const content::ContextMenuParams& params) OVERRIDE; |
| 50 virtual bool IsCommandIdSupported(int command_id) OVERRIDE; | 50 virtual bool IsCommandIdSupported(int command_id) OVERRIDE; |
| 51 virtual bool IsCommandIdEnabled(int command_id) OVERRIDE; | 51 virtual bool IsCommandIdEnabled(int command_id) OVERRIDE; |
| 52 virtual void ExecuteCommand(int command_id) OVERRIDE; | 52 virtual void ExecuteCommand(int command_id) OVERRIDE; |
| 53 | 53 |
| 54 // A callback function called when the Spelling service finishes checking a | 54 // A callback function called when the Spelling service finishes checking a |
| 55 // misspelled word. | 55 // misspelled word. |
| 56 void OnTextCheckComplete( | 56 void OnTextCheckComplete( |
| 57 int tag, | 57 int tag, |
| 58 const std::vector<WebKit::WebTextCheckingResult>& results); | 58 const std::vector<WebKit::WebTextCheckingResult>& results); |
| 59 | 59 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Flag indicating whether online spelling correction service is enabled. When | 104 // Flag indicating whether online spelling correction service is enabled. When |
| 105 // this variable is true and we right-click a misspelled word, we send a | 105 // this variable is true and we right-click a misspelled word, we send a |
| 106 // JSON-RPC request to the service and retrieve suggestions. | 106 // JSON-RPC request to the service and retrieve suggestions. |
| 107 bool integrate_spelling_service_; | 107 bool integrate_spelling_service_; |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(SpellingMenuObserver); | 109 DISALLOW_COPY_AND_ASSIGN(SpellingMenuObserver); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ | 112 #endif // CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ |
| OLD | NEW |