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

Unified Diff: webkit/glue/plugins/webplugin_impl.cc

Issue 2827047: Make RenderView call the plugin through WebKit::WebPlugin (instead of casting... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: compile until webkit is rolled Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/webplugin_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/webplugin_impl.cc
===================================================================
--- webkit/glue/plugins/webplugin_impl.cc (revision 51864)
+++ webkit/glue/plugins/webplugin_impl.cc (working copy)
@@ -2,11 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "webkit/glue/plugins/webplugin_impl.h"
+
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "gfx/rect.h"
+#include "googleurl/src/gurl.h"
#include "net/base/escape.h"
#include "net/base/net_errors.h"
#include "skia/ext/platform_canvas.h"
@@ -35,9 +38,7 @@
#include "webkit/glue/plugins/plugin_host.h"
#include "webkit/glue/plugins/plugin_instance.h"
#include "webkit/glue/plugins/webplugin_delegate.h"
-#include "webkit/glue/plugins/webplugin_impl.h"
#include "webkit/glue/plugins/webplugin_page_delegate.h"
-#include "googleurl/src/gurl.h"
using WebKit::WebCanvas;
using WebKit::WebConsoleMessage;
@@ -422,14 +423,54 @@
delegate_->PrintEnd();
}
-WebString WebPluginImpl::selectedText() {
+bool WebPluginImpl::hasSelection() const {
if (!delegate_)
+ return false;
+
+ return delegate_->HasSelection();
+}
+
+WebKit::WebString WebPluginImpl::selectionAsText() const {
+ if (!delegate_)
return WebString();
- return delegate_->GetSelectedText();
+ return delegate_->GetSelectionAsText();
}
+WebKit::WebString WebPluginImpl::selectionAsMarkup() const {
+ if (!delegate_)
+ return WebString();
+ return delegate_->GetSelectionAsMarkup();
+}
+
+void WebPluginImpl::setZoomFactor(float scale, bool text_only) {
+ if (delegate_)
+ delegate_->SetZoomFactor(scale, text_only);
+}
+
+bool WebPluginImpl::supportsFind() {
+ return delegate_ && delegate_->SupportsFind();
+}
+
+void WebPluginImpl::startFind(const WebString& search_text,
+ bool case_sensitive,
+ int identifier) {
+ if (delegate_)
+ delegate_->StartFind(search_text, case_sensitive, identifier);
+}
+
+void WebPluginImpl::selectFindResult(bool forward) {
+ if (delegate_)
+ delegate_->SelectFindResult(forward);
+}
+
+void WebPluginImpl::stopFind() {
+ if (delegate_)
+ delegate_->StopFind();
+}
+
+
// -----------------------------------------------------------------------------
WebPluginImpl::WebPluginImpl(
« no previous file with comments | « webkit/glue/plugins/webplugin_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698