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

Side by Side Diff: chrome/browser/tab_contents/spelling_menu_observer.h

Issue 9562002: Use a check item instead of changing its text. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 27 matching lines...) Expand all
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 IsCommandIdEnabled(int command_id) OVERRIDE; 49 virtual bool IsCommandIdEnabled(int command_id) OVERRIDE;
49 virtual void ExecuteCommand(int command_id) OVERRIDE; 50 virtual void ExecuteCommand(int command_id) OVERRIDE;
50 51
51 // A callback function called when the Spelling service finishes checking a 52 // A callback function called when the Spelling service finishes checking a
52 // misspelled word. 53 // misspelled word.
53 void OnTextCheckComplete( 54 void OnTextCheckComplete(
54 int tag, 55 int tag,
55 const std::vector<SpellCheckResult>& results); 56 const std::vector<SpellCheckResult>& results);
56 57
57 private: 58 private:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 // Flag indicating whether online spelling correction service is enabled. When 102 // Flag indicating whether online spelling correction service is enabled. When
102 // this variable is true and we right-click a misspelled word, we send a 103 // this variable is true and we right-click a misspelled word, we send a
103 // JSON-RPC request to the service and retrieve suggestions. 104 // JSON-RPC request to the service and retrieve suggestions.
104 bool integrate_spelling_service_; 105 bool integrate_spelling_service_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(SpellingMenuObserver); 107 DISALLOW_COPY_AND_ASSIGN(SpellingMenuObserver);
107 }; 108 };
108 109
109 #endif // CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_ 110 #endif // CHROME_BROWSER_TAB_CONTENTS_SPELLING_MENU_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698