summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 23:06:05 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 23:06:05 +0000
commit00d7e6289878922b937039cf542144a8c7906e8e (patch)
treec32e756faa3f6c079b81c5f759a65642b210bd2e /webkit
parent33eb5ad09b9cc9fe9f1fb95c4ba41ace5c3b6bc8 (diff)
downloadchromium_src-00d7e6289878922b937039cf542144a8c7906e8e.zip
chromium_src-00d7e6289878922b937039cf542144a8c7906e8e.tar.gz
chromium_src-00d7e6289878922b937039cf542144a8c7906e8e.tar.bz2
Use webtextinput to insert text for middle-click paste.
Remove InsertText() from webview. Review URL: http://codereview.chromium.org/87002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webtextinput.h14
-rw-r--r--webkit/glue/webview.h3
-rw-r--r--webkit/glue/webview_impl.cc12
-rw-r--r--webkit/glue/webview_impl.h3
4 files changed, 6 insertions, 26 deletions
diff --git a/webkit/glue/webtextinput.h b/webkit/glue/webtextinput.h
index fb51f83..60dfa7a 100644
--- a/webkit/glue/webtextinput.h
+++ b/webkit/glue/webtextinput.h
@@ -1,13 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-//
-// Class WebTextInput provides text input APIs used by TextInputController
-// in test_shell. It only facilitates layout tests and should not be used
-// by renderers.
-#ifndef WEBKIT_GLUE_WEBTEXTINPUT_H__
-#define WEBKIT_GLUE_WEBTEXTINPUT_H__
+#ifndef WEBKIT_GLUE_WEBTEXTINPUT_H_
+#define WEBKIT_GLUE_WEBTEXTINPUT_H_
#include <string>
#include "base/basictypes.h"
@@ -56,7 +52,7 @@ class WebTextInput {
virtual void MakeAttributedString(const std::string& str) = 0;
private:
- DISALLOW_EVIL_CONSTRUCTORS(WebTextInput);
+ DISALLOW_COPY_AND_ASSIGN(WebTextInput);
};
-#endif // #ifndef WEBKIT_GLUE_WEBTEXTINPUT_H__
+#endif // #ifndef WEBKIT_GLUE_WEBTEXTINPUT_H_
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h
index 99ad41e..8f39bd31 100644
--- a/webkit/glue/webview.h
+++ b/webkit/glue/webview.h
@@ -166,9 +166,6 @@ class WebView : public WebWidget {
virtual void ZoomOut(bool text_only) = 0;
virtual void ResetZoom() = 0;
- // Insert text into the current editor.
- virtual void InsertText(const string16& text) = 0;
-
// Copy to the clipboard the image located at a particular point in the
// WebView (if there is such an image)
virtual void CopyImageAt(int x, int y) = 0;
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 11e1d07..03db938 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -1550,18 +1550,6 @@ void WebViewImpl::ResetZoom() {
main_frame()->frame()->isZoomFactorTextOnly());
}
-void WebViewImpl::InsertText(const string16& text) {
- Frame* focused = GetFocusedWebCoreFrame();
- if (!focused)
- return;
- Editor* editor = focused->editor();
- if (!editor || !editor->canEdit())
- return;
-
- editor->insertTextWithoutSendingTextEvent(
- webkit_glue::String16ToString(text), false, NULL);
-}
-
void WebViewImpl::CopyImageAt(int x, int y) {
if (!page_.get())
return;
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index 373bcd5..5b3565b 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -92,7 +92,6 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
virtual void ZoomIn(bool text_only);
virtual void ZoomOut(bool text_only);
virtual void ResetZoom();
- virtual void InsertText(const string16& text);
virtual void CopyImageAt(int x, int y);
virtual void InspectElement(int x, int y);
virtual void ShowJavaScriptConsole();