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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2799923003: Change SpellCheckProvider into a RenderFrameObserver (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 1067
1068 return frame()->editor().executeCommand(name, value); 1068 return frame()->editor().executeCommand(name, value);
1069 } 1069 }
1070 1070
1071 bool WebLocalFrameImpl::isCommandEnabled(const WebString& name) const { 1071 bool WebLocalFrameImpl::isCommandEnabled(const WebString& name) const {
1072 DCHECK(frame()); 1072 DCHECK(frame());
1073 return frame()->editor().createCommand(name).isEnabled(); 1073 return frame()->editor().createCommand(name).isEnabled();
1074 } 1074 }
1075 1075
1076 void WebLocalFrameImpl::enableSpellChecking(bool enable) { 1076 void WebLocalFrameImpl::enableSpellChecking(bool enable) {
1077 CHECK(frame());
Xiaocheng 2017/04/07 01:43:46 Crash site.
1077 if (enable == isSpellCheckingEnabled()) 1078 if (enable == isSpellCheckingEnabled())
1078 return; 1079 return;
1079 frame()->spellChecker().toggleSpellCheckingEnabled(); 1080 frame()->spellChecker().toggleSpellCheckingEnabled();
1080 } 1081 }
1081 1082
1082 bool WebLocalFrameImpl::isSpellCheckingEnabled() const { 1083 bool WebLocalFrameImpl::isSpellCheckingEnabled() const {
1083 return frame()->spellChecker().isSpellCheckingEnabled(); 1084 return frame()->spellChecker().isSpellCheckingEnabled();
1084 } 1085 }
1085 1086
1086 void WebLocalFrameImpl::replaceMisspelledRange(const WebString& text) { 1087 void WebLocalFrameImpl::replaceMisspelledRange(const WebString& text) {
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
2525 TextCheckerClient& WebLocalFrameImpl::textCheckerClient() const { 2526 TextCheckerClient& WebLocalFrameImpl::textCheckerClient() const {
2526 return *m_textCheckerClient; 2527 return *m_textCheckerClient;
2527 } 2528 }
2528 2529
2529 void WebLocalFrameImpl::setTextCheckClient( 2530 void WebLocalFrameImpl::setTextCheckClient(
2530 WebTextCheckClient* textCheckClient) { 2531 WebTextCheckClient* textCheckClient) {
2531 m_textCheckClient = textCheckClient; 2532 m_textCheckClient = textCheckClient;
2532 } 2533 }
2533 2534
2534 } // namespace blink 2535 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698