WebKit2: Implement TextChecker on Windows
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 15:15:36 +0000 (15:15 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 15:15:36 +0000 (15:15 +0000)
commitd2c7680824c97104d0f636b38045e1c1110f117b
tree69843f85edfd410fa1b0dc4c1bb4c88d8edba69d
parentca00acea5a3a6b6501c2986a5bc65f5af9868b0c
WebKit2: Implement TextChecker on Windows
https://bugs.webkit.org/show_bug.cgi?id=57862

Reviewed by Anders Carlsson.

Part 1: Get and set the state.

* Shared/API/c/win/WKBaseWin.h:
* Shared/APIObject.h:
* UIProcess/API/C/win/WKAPICastWin.h:

* UIProcess/API/C/win/WKTextChecker.cpp: Added.
(WKTextCheckerSetClient):
(WKTextCheckerContinuousSpellCheckingEnabledStateChanged):
(WKTextCheckerGrammarCheckingEnabledStateChanged):
* UIProcess/API/C/win/WKTextChecker.h: Added.

* UIProcess/TextChecker.h:
* UIProcess/win/TextCheckerWin.cpp:
(WebKit::TextChecker::state):
Do the initalization for the state only once so that it is not necessary to call the client
every time the state is requested.
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
Call the client.
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
Update the state and tell the client.
(WebKit::TextChecker::setGrammarCheckingEnabled):
Ditto.
(WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
Update the state.
(WebKit::TextChecker::grammarCheckingEnabledStateChanged):
Update the state.

* UIProcess/win/WebTextChecker.cpp: Added.
(WebKit::WebTextChecker::shared):
Make the WebTextChecker available globally.
(WebKit::WebTextChecker::WebTextChecker):
(WebKit::WebTextChecker::setClient):
(WebKit::updateStateForAllWebProcesses):
(WebKit::WebTextChecker::continuousSpellCheckingEnabledStateChanged):
Tell the TextChecker that the state has changed, and then tell the
WebProcessProxies to send the new state to the WebProcesses.
(WebKit::WebTextChecker::grammarCheckingEnabledStateChanged):
Ditto.
* UIProcess/win/WebTextChecker.h: Added.
(WebKit::WebTextChecker::client):
(WebKit::WebTextChecker::type):

* UIProcess/win/WebTextCheckerClient.cpp: Added.
(WebKit::WebTextCheckerClient::continuousSpellCheckingAllowed):
(WebKit::WebTextCheckerClient::continuousSpellCheckingEnabled):
(WebKit::WebTextCheckerClient::setContinuousSpellCheckingEnabled):
(WebKit::WebTextCheckerClient::grammarCheckingEnabled):
(WebKit::WebTextCheckerClient::setGrammarCheckingEnabled):
* UIProcess/win/WebTextCheckerClient.h: Added.

* win/WebKit2.vcproj:
Add WKTextChecker.h/.cpp, WebTextChecker.h/.cpp, and WebTextCheckerClient.h/.cpp.
* win/WebKit2Generated.make:
Copy over WKTextChecker.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/win/WKBaseWin.h
Source/WebKit2/Shared/APIObject.h
Source/WebKit2/UIProcess/API/C/win/WKAPICastWin.h
Source/WebKit2/UIProcess/API/C/win/WKTextChecker.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/C/win/WKTextChecker.h [new file with mode: 0644]
Source/WebKit2/UIProcess/TextChecker.h
Source/WebKit2/UIProcess/win/TextCheckerWin.cpp
Source/WebKit2/UIProcess/win/WebTextChecker.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/win/WebTextChecker.h [new file with mode: 0644]
Source/WebKit2/UIProcess/win/WebTextCheckerClient.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/win/WebTextCheckerClient.h [new file with mode: 0644]
Source/WebKit2/win/WebKit2.vcproj
Source/WebKit2/win/WebKit2Generated.make