| 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/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/prefs/pref_member.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/browser/renderer_host/render_view_host.h" | 17 #include "content/browser/renderer_host/render_view_host.h" |
| 18 #include "content/browser/renderer_host/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" |
| 21 #include "ui/base/models/simple_menu_model.h" | 21 #include "ui/base/models/simple_menu_model.h" |
| 22 | 22 |
| 23 using content::BrowserThread; | 23 using content::BrowserThread; |
| 24 | 24 |
| 25 SpellCheckerSubMenuObserver::SpellCheckerSubMenuObserver( | 25 SpellCheckerSubMenuObserver::SpellCheckerSubMenuObserver( |
| 26 RenderViewContextMenuProxy* proxy, | 26 RenderViewContextMenuProxy* proxy, |
| 27 ui::SimpleMenuModel::Delegate* delegate, | 27 ui::SimpleMenuModel::Delegate* delegate, |
| 28 int group) | 28 int group) |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return; | 172 return; |
| 173 } | 173 } |
| 174 | 174 |
| 175 RenderViewHost* rvh = proxy_->GetRenderViewHost(); | 175 RenderViewHost* rvh = proxy_->GetRenderViewHost(); |
| 176 switch (command_id) { | 176 switch (command_id) { |
| 177 case IDC_CHECK_SPELLING_OF_THIS_FIELD: | 177 case IDC_CHECK_SPELLING_OF_THIS_FIELD: |
| 178 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->routing_id())); | 178 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->routing_id())); |
| 179 break; | 179 break; |
| 180 } | 180 } |
| 181 } | 181 } |
| OLD | NEW |