summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webview_impl.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-07 23:24:58 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-07 23:24:58 +0000
commite80c73be12cc2211d5a72a5ff85eb97366b2458f (patch)
tree5c395779776b368ed6cafdbc5c6bc929776c18a4 /webkit/glue/webview_impl.h
parent25a3f6b52228bc68ce63c4032ed6b17cecd7b3c5 (diff)
downloadchromium_src-e80c73be12cc2211d5a72a5ff85eb97366b2458f.zip
chromium_src-e80c73be12cc2211d5a72a5ff85eb97366b2458f.tar.gz
chromium_src-e80c73be12cc2211d5a72a5ff85eb97366b2458f.tar.bz2
Switch to using WebDragData in WebView and WebViewDelegate.
I also cleaned up some of the WebView and WebViewDelegate methods to pass WebPoint instead of pairs of ints or gfx::Point. With this change, I am keeping webkit/glue/webdropdata.{h,cc}, which is what Chrome uses to pass around the equivalent data. Now, it is possible to construct a WebDropData from a WebKit::WebDragData and to also get a WebKit::WebDragData from a WebDropData. Hence, the conversion between WebDropData and ChromiumDataObject (see clipboard_conversion.{h,cc}) is now removed in favor of conversion between WebDropData and WebKit::WebDragData. Conversion between WebKit::WebDragData and WebCore::ChromiumDataObject is very cheap (just reference counting). Finally, this change also brings in WebData, which is now used by the return value of WebKitClient::loadResource. As a companion to that change, I also changed webkit_glue::GetDataResource to return StringPiece instead of std::string. That also saves on an unnecessary buffer copy. R=dglazkov Review URL: http://codereview.chromium.org/63084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webview_impl.h')
-rw-r--r--webkit/glue/webview_impl.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index 2baf9de..e52a8d2 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -13,7 +13,6 @@
#include "base/gfx/size.h"
#include "skia/ext/platform_canvas.h"
#include "webkit/glue/back_forward_list_client_impl.h"
-#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webview.h"
@@ -44,7 +43,6 @@ class WebMouseWheelEvent;
class AutocompletePopupMenuClient;
class ImageResourceFetcher;
class SearchableFormData;
-struct WebDropData;
class WebHistoryItemImpl;
class WebDevToolsAgent;
class WebDevToolsAgentImpl;
@@ -98,17 +96,23 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
virtual void InspectElement(int x, int y);
virtual void ShowJavaScriptConsole();
virtual void DragSourceEndedAt(
- int client_x, int client_y, int screen_x, int screen_y);
+ const WebKit::WebPoint& client_point,
+ const WebKit::WebPoint& screen_point);
virtual void DragSourceMovedTo(
- int client_x, int client_y, int screen_x, int screen_y);
+ const WebKit::WebPoint& client_point,
+ const WebKit::WebPoint& screen_point);
virtual void DragSourceSystemDragEnded();
- virtual bool DragTargetDragEnter(const WebDropData& drop_data,
- int client_x, int client_y, int screen_x, int screen_y);
+ virtual bool DragTargetDragEnter(
+ const WebKit::WebDragData& drag_data, int identity,
+ const WebKit::WebPoint& client_point,
+ const WebKit::WebPoint& screen_point);
virtual bool DragTargetDragOver(
- int client_x, int client_y, int screen_x, int screen_y);
+ const WebKit::WebPoint& client_point,
+ const WebKit::WebPoint& screen_point);
virtual void DragTargetDragLeave();
virtual void DragTargetDrop(
- int client_x, int client_y, int screen_x, int screen_y);
+ const WebKit::WebPoint& client_point,
+ const WebKit::WebPoint& screen_point);
virtual int32 GetDragIdentity();
virtual void AutofillSuggestionsForNode(
int64 node_id,
@@ -193,7 +197,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
}
// Start a system drag and drop operation.
- void StartDragging(const WebDropData& drop_data);
+ void StartDragging(const WebKit::WebDragData& drag_data);
// ImageResourceFetcher callback.
void ImageResourceDownloadDone(ImageResourceFetcher* fetcher,
@@ -258,7 +262,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
WebPreferences webprefs_;
// A copy of the web drop data object we received from the browser.
- RefPtr<WebCore::ChromiumDataObject> current_drop_data_;
+ RefPtr<WebCore::ChromiumDataObject> current_drag_data_;
private:
// Returns true if the event was actually processed.