summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webclipboard_impl.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 00:15:20 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 00:15:20 +0000
commitc62ce3e9f74a7b55b2d50c227555a3c198fd9cf3 (patch)
tree53fc0d34109ac909a7ba8f603835da8468abcd10 /webkit/glue/webclipboard_impl.h
parentbb095ea448d990cf3ab9ae3af4c9fc11d6348f90 (diff)
downloadchromium_src-c62ce3e9f74a7b55b2d50c227555a3c198fd9cf3.zip
chromium_src-c62ce3e9f74a7b55b2d50c227555a3c198fd9cf3.tar.gz
chromium_src-c62ce3e9f74a7b55b2d50c227555a3c198fd9cf3.tar.bz2
Chromium changes to use new WebKit, WebKitClient, and WebClipboard interfaces.
A new WebKitClientImpl class is added to webkit/glue that consumers can use to help implement WebKitClient. In the future, consumers will likely subclass WebKitClientImpl. For now, that is not necessary. Since a WebImage may not hold a SkBitmap, I needed to modify ScopedClipboardWriterGlue to not deal in SkBitmaps. So, I just added a WriteBitmapFromPixels method in place of the WriteBitmap method. That method is actually named the same as the one from the base class, which is perhaps kind of nice since the purpose of ScopedClipboardWriterGlue is to override the default way of sending an image to the clipboard! R=dglazkov Review URL: http://codereview.chromium.org/28119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webclipboard_impl.h')
-rw-r--r--webkit/glue/webclipboard_impl.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/webkit/glue/webclipboard_impl.h b/webkit/glue/webclipboard_impl.h
new file mode 100644
index 0000000..2be3ea6
--- /dev/null
+++ b/webkit/glue/webclipboard_impl.h
@@ -0,0 +1,34 @@
+// 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.
+
+#ifndef WEBCLIPBOARD_IMPL_H_
+#define WEBCLIPBOARD_IMPL_H_
+
+#include "WebClipboard.h"
+
+namespace webkit_glue {
+
+class WebClipboardImpl : public WebKit::WebClipboard {
+ public:
+ // WebClipboard methods:
+ virtual bool isFormatAvailable(WebKit::WebClipboard::Format);
+ virtual WebKit::WebString readPlainText();
+ virtual WebKit::WebString readHTML(WebKit::WebURL* source_url);
+ virtual void writeHTML(
+ const WebKit::WebString& html_text,
+ const WebKit::WebURL& source_url,
+ const WebKit::WebString& plain_text,
+ bool write_smart_paste);
+ virtual void writeURL(
+ const WebKit::WebURL&,
+ const WebKit::WebString& title);
+ virtual void writeImage(
+ const WebKit::WebImage&,
+ const WebKit::WebURL& source_url,
+ const WebKit::WebString& title);
+};
+
+} // namespace webkit_glue
+
+#endif // WEBCLIPBOARD_IMPL_H_