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/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h" | 10 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 return false; | 114 return false; |
115 } | 115 } |
116 | 116 |
117 void SpellCheckerSubMenuObserver::ExecuteCommand(int command_id) { | 117 void SpellCheckerSubMenuObserver::ExecuteCommand(int command_id) { |
118 DCHECK(IsCommandIdSupported(command_id)); | 118 DCHECK(IsCommandIdSupported(command_id)); |
119 | 119 |
120 RenderViewHost* rvh = proxy_->GetRenderViewHost(); | 120 RenderViewHost* rvh = proxy_->GetRenderViewHost(); |
121 switch (command_id) { | 121 switch (command_id) { |
122 case IDC_CHECK_SPELLING_OF_THIS_FIELD: | 122 case IDC_CHECK_SPELLING_OF_THIS_FIELD: |
123 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->routing_id())); | 123 rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID())); |
124 break; | 124 break; |
125 | 125 |
126 case IDC_SPELLPANEL_TOGGLE: | 126 case IDC_SPELLPANEL_TOGGLE: |
127 rvh->Send(new SpellCheckMsg_ToggleSpellPanel( | 127 rvh->Send(new SpellCheckMsg_ToggleSpellPanel( |
128 rvh->routing_id(), spellcheck_mac::SpellingPanelVisible())); | 128 rvh->GetRoutingID(), spellcheck_mac::SpellingPanelVisible())); |
129 break; | 129 break; |
130 } | 130 } |
131 } | 131 } |
OLD | NEW |