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

Side by Side Diff: webkit/glue/webview_impl.h

Issue 174364: Plumb the DragOperation through all the layers between the platform DnD code ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webview_delegate.h ('k') | webkit/glue/webview_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_GLUE_WEBVIEW_IMPL_H_ 5 #ifndef WEBKIT_GLUE_WEBVIEW_IMPL_H_
6 #define WEBKIT_GLUE_WEBVIEW_IMPL_H_ 6 #define WEBKIT_GLUE_WEBVIEW_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "Page.h" 10 #include "Page.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 virtual const std::wstring& GetInspectorSettings() const; 95 virtual const std::wstring& GetInspectorSettings() const;
96 virtual void SetInspectorSettings(const std::wstring& settings); 96 virtual void SetInspectorSettings(const std::wstring& settings);
97 virtual void SetPageEncoding(const std::wstring& encoding_name); 97 virtual void SetPageEncoding(const std::wstring& encoding_name);
98 virtual std::wstring GetMainFrameEncodingName(); 98 virtual std::wstring GetMainFrameEncodingName();
99 virtual void ZoomIn(bool text_only); 99 virtual void ZoomIn(bool text_only);
100 virtual void ZoomOut(bool text_only); 100 virtual void ZoomOut(bool text_only);
101 virtual void ResetZoom(); 101 virtual void ResetZoom();
102 virtual void CopyImageAt(int x, int y); 102 virtual void CopyImageAt(int x, int y);
103 virtual void InspectElement(int x, int y); 103 virtual void InspectElement(int x, int y);
104 virtual void ShowJavaScriptConsole(); 104 virtual void ShowJavaScriptConsole();
105 virtual void DragSourceCancelledAt(
106 const WebKit::WebPoint& client_point,
107 const WebKit::WebPoint& screen_point);
108 virtual void DragSourceEndedAt( 105 virtual void DragSourceEndedAt(
109 const WebKit::WebPoint& client_point, 106 const WebKit::WebPoint& client_point,
110 const WebKit::WebPoint& screen_point); 107 const WebKit::WebPoint& screen_point,
108 WebKit::WebDragOperation operation);
111 virtual void DragSourceMovedTo( 109 virtual void DragSourceMovedTo(
112 const WebKit::WebPoint& client_point, 110 const WebKit::WebPoint& client_point,
113 const WebKit::WebPoint& screen_point); 111 const WebKit::WebPoint& screen_point);
114 virtual void DragSourceSystemDragEnded(); 112 virtual void DragSourceSystemDragEnded();
115 virtual bool DragTargetDragEnter( 113 virtual WebKit::WebDragOperation DragTargetDragEnter(
116 const WebKit::WebDragData& drag_data, int identity, 114 const WebKit::WebDragData& drag_data, int identity,
117 const WebKit::WebPoint& client_point, 115 const WebKit::WebPoint& client_point,
118 const WebKit::WebPoint& screen_point); 116 const WebKit::WebPoint& screen_point,
119 virtual bool DragTargetDragOver( 117 WebKit::WebDragOperationsMask operations_allowed);
118 virtual WebKit::WebDragOperation DragTargetDragOver(
120 const WebKit::WebPoint& client_point, 119 const WebKit::WebPoint& client_point,
121 const WebKit::WebPoint& screen_point); 120 const WebKit::WebPoint& screen_point,
121 WebKit::WebDragOperationsMask operations_allowed);
122 virtual void DragTargetDragLeave(); 122 virtual void DragTargetDragLeave();
123 virtual void DragTargetDrop( 123 virtual void DragTargetDrop(
124 const WebKit::WebPoint& client_point, 124 const WebKit::WebPoint& client_point,
125 const WebKit::WebPoint& screen_point); 125 const WebKit::WebPoint& screen_point);
126 virtual int32 GetDragIdentity(); 126 virtual int32 GetDragIdentity();
127 virtual bool SetDropEffect(bool accept); 127 virtual bool SetDropEffect(bool accept);
128 virtual void AutofillSuggestionsForNode( 128 virtual void AutofillSuggestionsForNode(
129 int64 node_id, 129 int64 node_id,
130 const std::vector<std::wstring>& suggestions, 130 const std::vector<std::wstring>& suggestions,
131 int default_suggestion_index); 131 int default_suggestion_index);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 // Set the disposition for how this webview is to be initially shown. 216 // Set the disposition for how this webview is to be initially shown.
217 void set_initial_navigation_policy(WebKit::WebNavigationPolicy policy) { 217 void set_initial_navigation_policy(WebKit::WebNavigationPolicy policy) {
218 initial_navigation_policy_ = policy; 218 initial_navigation_policy_ = policy;
219 } 219 }
220 WebKit::WebNavigationPolicy initial_navigation_policy() const { 220 WebKit::WebNavigationPolicy initial_navigation_policy() const {
221 return initial_navigation_policy_; 221 return initial_navigation_policy_;
222 } 222 }
223 223
224 // Start a system drag and drop operation. 224 // Start a system drag and drop operation.
225 void StartDragging(const WebKit::WebDragData& drag_data); 225 void StartDragging(WebKit::WebPoint event_pos,
226 const WebKit::WebDragData& drag_data,
227 WebKit::WebDragOperationsMask drag_source_operation_mask);
226 228
227 // Hides the autocomplete popup if it is showing. 229 // Hides the autocomplete popup if it is showing.
228 void HideAutoCompletePopup(); 230 void HideAutoCompletePopup();
229 231
230 // Converts |x|, |y| from window coordinates to contents coordinates and gets 232 // Converts |x|, |y| from window coordinates to contents coordinates and gets
231 // the underlying Node for them. 233 // the underlying Node for them.
232 WebCore::Node* GetNodeForWindowPos(int x, int y); 234 WebCore::Node* GetNodeForWindowPos(int x, int y);
233 235
234 #if ENABLE(NOTIFICATIONS) 236 #if ENABLE(NOTIFICATIONS)
235 // Returns the provider of desktop notifications. 237 // Returns the provider of desktop notifications.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 int32 drag_identity_; 348 int32 drag_identity_;
347 349
348 // Valid when drag_target_dispatch_ is true. Used to override the default 350 // Valid when drag_target_dispatch_ is true. Used to override the default
349 // browser drop effect with the effects "none" or "copy". 351 // browser drop effect with the effects "none" or "copy".
350 enum DragTargetDropEffect { 352 enum DragTargetDropEffect {
351 DROP_EFFECT_DEFAULT = -1, 353 DROP_EFFECT_DEFAULT = -1,
352 DROP_EFFECT_NONE, 354 DROP_EFFECT_NONE,
353 DROP_EFFECT_COPY 355 DROP_EFFECT_COPY
354 } drop_effect_; 356 } drop_effect_;
355 357
356 // When true, the drag data can be dropped onto the current drop target in 358 // The available drag operations (copy, move link...) allowed by the source.
357 // this WebView (the drop target can accept the drop). 359 WebKit::WebDragOperation operations_allowed_;
358 bool drop_accept_; 360
361 // The current drag operation as negotiated by the source and destination.
362 // When not equal to DragOperationNone, the drag data can be dropped onto the
363 // current drop target in this WebView (the drop target can accept the drop).
364 WebKit::WebDragOperation drag_operation_;
359 365
360 // The autocomplete popup. Kept around and reused every-time new suggestions 366 // The autocomplete popup. Kept around and reused every-time new suggestions
361 // should be shown. 367 // should be shown.
362 RefPtr<WebCore::PopupContainer> autocomplete_popup_; 368 RefPtr<WebCore::PopupContainer> autocomplete_popup_;
363 369
364 // Whether the autocomplete popup is currently showing. 370 // Whether the autocomplete popup is currently showing.
365 bool autocomplete_popup_showing_; 371 bool autocomplete_popup_showing_;
366 372
367 // The autocomplete client. 373 // The autocomplete client.
368 scoped_ptr<AutocompletePopupMenuClient> autocomplete_popup_client_; 374 scoped_ptr<AutocompletePopupMenuClient> autocomplete_popup_client_;
(...skipping 18 matching lines...) Expand all
387 static const WebKit::WebInputEvent* current_input_event() { 393 static const WebKit::WebInputEvent* current_input_event() {
388 return g_current_input_event; 394 return g_current_input_event;
389 } 395 }
390 private: 396 private:
391 static const WebKit::WebInputEvent* g_current_input_event; 397 static const WebKit::WebInputEvent* g_current_input_event;
392 398
393 DISALLOW_COPY_AND_ASSIGN(WebViewImpl); 399 DISALLOW_COPY_AND_ASSIGN(WebViewImpl);
394 }; 400 };
395 401
396 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H_ 402 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/webview_delegate.h ('k') | webkit/glue/webview_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698