summaryrefslogtreecommitdiffstats
path: root/webkit/glue/editor_client_impl.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 05:42:51 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 05:42:51 +0000
commit79dbc66fba17d6b4967fe86a577b11d15548cdec (patch)
treedf2853054e47aa76cea79eb6664f4c21cb54bd9e /webkit/glue/editor_client_impl.h
parentbdc66ceff07dac7b74ddea70fabdf535936d39b1 (diff)
downloadchromium_src-79dbc66fba17d6b4967fe86a577b11d15548cdec.zip
chromium_src-79dbc66fba17d6b4967fe86a577b11d15548cdec.tar.gz
chromium_src-79dbc66fba17d6b4967fe86a577b11d15548cdec.tar.bz2
Hook up WebEditingClient.
Moves the WebViewDelegate parameter back to WebView::Create and adds a second parameter for WebEditingClient. I had hoped to make the WebEditingClient NULL for RenderView on Windows and Mac, but that turned out to not be an option. I need a few methods on all platforms. The Describe* functions from EditorClientImpl are moved into the TestWebViewDelegate since they are only applicable to layout tests. R=dglazkov BUG= TEST=none Review URL: http://codereview.chromium.org/195008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/editor_client_impl.h')
-rw-r--r--webkit/glue/editor_client_impl.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/webkit/glue/editor_client_impl.h b/webkit/glue/editor_client_impl.h
index ad133a7..1ca7ce1 100644
--- a/webkit/glue/editor_client_impl.h
+++ b/webkit/glue/editor_client_impl.h
@@ -18,13 +18,19 @@ class HTMLInputElement;
class Node;
class PlatformKeyboardEvent;
}
+namespace WebKit {
+class WebEditingClient;
+}
-class WebView;
class WebViewImpl;
class EditorClientImpl : public WebCore::EditorClient {
public:
- EditorClientImpl(WebView* web_view);
+ EditorClientImpl(WebViewImpl* web_view,
+ WebKit::WebEditingClient* editing_client);
+
+ void DropEditingClient() { editing_client_ = NULL; }
+
virtual ~EditorClientImpl();
virtual void pageDestroyed();
@@ -103,20 +109,6 @@ class EditorClientImpl : public WebCore::EditorClient {
WTF::Vector<WebCore::String>& guesses);
virtual void setInputMethodState(bool enabled);
- void SetUseEditorDelegate(bool value) { use_editor_delegate_ = value; }
-
- // It would be better to add these methods to the objects they describe, but
- // those are in WebCore and therefore inaccessible.
- virtual std::wstring DescribeOrError(int number,
- WebCore::ExceptionCode ec);
- virtual std::wstring DescribeOrError(WebCore::Node* node,
- WebCore::ExceptionCode ec);
- virtual std::wstring Describe(WebCore::Range* range);
- virtual std::wstring Describe(WebCore::Node* node);
- virtual std::wstring Describe(WebCore::EditorInsertAction action);
- virtual std::wstring Describe(WebCore::EAffinity affinity);
- virtual std::wstring Describe(WebCore::CSSStyleDeclaration* style);
-
// Shows the form autofill popup for |node| if it is an HTMLInputElement and
// it is empty. This is called when you press the up or down arrow in a
// text-field or when clicking an already focused text-field.
@@ -162,7 +154,7 @@ class EditorClientImpl : public WebCore::EditorClient {
protected:
WebViewImpl* web_view_;
- bool use_editor_delegate_;
+ WebKit::WebEditingClient* editing_client_;
bool in_redo_;
typedef std::deque<WTF::RefPtr<WebCore::EditCommand> > EditCommandStack;