| OLD | NEW |
| 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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 | 1058 |
| 1059 return frame()->editor().executeCommand(name, value); | 1059 return frame()->editor().executeCommand(name, value); |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 bool WebLocalFrameImpl::isCommandEnabled(const WebString& name) const | 1062 bool WebLocalFrameImpl::isCommandEnabled(const WebString& name) const |
| 1063 { | 1063 { |
| 1064 DCHECK(frame()); | 1064 DCHECK(frame()); |
| 1065 return frame()->editor().createCommand(name).isEnabled(); | 1065 return frame()->editor().createCommand(name).isEnabled(); |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 void WebLocalFrameImpl::enableContinuousSpellChecking(bool enable) | 1068 void WebLocalFrameImpl::enableSpellChecking(bool enable) |
| 1069 { | 1069 { |
| 1070 if (enable == isContinuousSpellCheckingEnabled()) | 1070 if (enable == isSpellCheckingEnabled()) |
| 1071 return; | 1071 return; |
| 1072 frame()->spellChecker().toggleContinuousSpellChecking(); | 1072 frame()->spellChecker().toggleSpellCheckingEnabled(); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 bool WebLocalFrameImpl::isContinuousSpellCheckingEnabled() const | 1075 bool WebLocalFrameImpl::isSpellCheckingEnabled() const |
| 1076 { | 1076 { |
| 1077 return frame()->spellChecker().isContinuousSpellCheckingEnabled(); | 1077 return frame()->spellChecker().isSpellCheckingEnabled(); |
| 1078 } | 1078 } |
| 1079 | 1079 |
| 1080 void WebLocalFrameImpl::requestTextChecking(const WebElement& webElement) | 1080 void WebLocalFrameImpl::requestTextChecking(const WebElement& webElement) |
| 1081 { | 1081 { |
| 1082 if (webElement.isNull()) | 1082 if (webElement.isNull()) |
| 1083 return; | 1083 return; |
| 1084 frame()->spellChecker().requestTextChecking(*webElement.constUnwrap<Element>
()); | 1084 frame()->spellChecker().requestTextChecking(*webElement.constUnwrap<Element>
()); |
| 1085 } | 1085 } |
| 1086 | 1086 |
| 1087 void WebLocalFrameImpl::replaceMisspelledRange(const WebString& text) | 1087 void WebLocalFrameImpl::replaceMisspelledRange(const WebString& text) |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2240 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2240 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2241 } else if (metric == "wasAlternateProtocolAvailable") { | 2241 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2242 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2242 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2243 } else if (metric == "connectionInfo") { | 2243 } else if (metric == "connectionInfo") { |
| 2244 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2244 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2245 } | 2245 } |
| 2246 UseCounter::count(frame(), feature); | 2246 UseCounter::count(frame(), feature); |
| 2247 } | 2247 } |
| 2248 | 2248 |
| 2249 } // namespace blink | 2249 } // namespace blink |
| OLD | NEW |