| 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 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat
e.h" | 5 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat
e.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 ChromeRenderWidgetHostViewMacDelegate* view_delegate) | 44 ChromeRenderWidgetHostViewMacDelegate* view_delegate) |
| 45 : content::WebContentsObserver( | 45 : content::WebContentsObserver( |
| 46 content::WebContents::FromRenderViewHost(host)), | 46 content::WebContents::FromRenderViewHost(host)), |
| 47 view_delegate_(view_delegate) { | 47 view_delegate_(view_delegate) { |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual ~SpellCheckObserver() { | 50 virtual ~SpellCheckObserver() { |
| 51 } | 51 } |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { | 54 virtual bool OnMessageReceived(const IPC::Message& message) override { |
| 55 bool handled = true; | 55 bool handled = true; |
| 56 IPC_BEGIN_MESSAGE_MAP(SpellCheckObserver, message) | 56 IPC_BEGIN_MESSAGE_MAP(SpellCheckObserver, message) |
| 57 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_ToggleSpellCheck, | 57 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_ToggleSpellCheck, |
| 58 OnToggleSpellCheck) | 58 OnToggleSpellCheck) |
| 59 IPC_MESSAGE_UNHANDLED(handled = false) | 59 IPC_MESSAGE_UNHANDLED(handled = false) |
| 60 IPC_END_MESSAGE_MAP() | 60 IPC_END_MESSAGE_MAP() |
| 61 return handled; | 61 return handled; |
| 62 } | 62 } |
| 63 | 63 |
| 64 void OnToggleSpellCheck(bool enabled, bool checked) { | 64 void OnToggleSpellCheck(bool enabled, bool checked) { |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 } | 255 } |
| 256 | 256 |
| 257 - (void)spellCheckEnabled:(BOOL)enabled checked:(BOOL)checked { | 257 - (void)spellCheckEnabled:(BOOL)enabled checked:(BOOL)checked { |
| 258 spellcheckEnabled_ = enabled; | 258 spellcheckEnabled_ = enabled; |
| 259 spellcheckChecked_ = checked; | 259 spellcheckChecked_ = checked; |
| 260 } | 260 } |
| 261 | 261 |
| 262 // END Spellchecking methods | 262 // END Spellchecking methods |
| 263 | 263 |
| 264 @end | 264 @end |
| OLD | NEW |