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 #include "chrome/browser/tab_contents/spellchecker_submenu_observer.h" | 5 #include "chrome/browser/tab_contents/spellchecker_submenu_observer.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/api/prefs/pref_member.h" |
9 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/prefs/pref_member.h" | |
11 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
12 #include "chrome/browser/spellchecker/spellcheck_host.h" | 12 #include "chrome/browser/spellchecker/spellcheck_host.h" |
13 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 13 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "chrome/common/spellcheck_messages.h" | 16 #include "chrome/common/spellcheck_messages.h" |
17 #include "content/public/browser/render_view_host.h" | 17 #include "content/public/browser/render_view_host.h" |
18 #include "content/public/browser/render_widget_host_view.h" | 18 #include "content/public/browser/render_widget_host_view.h" |
19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 switch (command_id) { | 164 switch (command_id) { |
165 case IDC_CHECK_SPELLING_WHILE_TYPING: | 165 case IDC_CHECK_SPELLING_WHILE_TYPING: |
166 profile->GetPrefs()->SetBoolean( | 166 profile->GetPrefs()->SetBoolean( |
167 prefs::kEnableSpellCheck, | 167 prefs::kEnableSpellCheck, |
168 !profile->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); | 168 !profile->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); |
169 if (rvh) | 169 if (rvh) |
170 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID())); | 170 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID())); |
171 break; | 171 break; |
172 } | 172 } |
173 } | 173 } |
OLD | NEW |