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

Side by Side Diff: content/browser/renderer_host/render_view_host_delegate_view.h

Issue 2505113002: Drag-and-drop: Target drag messages to specific RenderWidgets. (Closed)
Patch Set: Small fix. Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/drag_event_source_info.h" 13 #include "content/common/drag_event_source_info.h"
14 #include "third_party/WebKit/public/platform/WebDragOperation.h" 14 #include "third_party/WebKit/public/platform/WebDragOperation.h"
15 15
16 namespace gfx { 16 namespace gfx {
17 class ImageSkia; 17 class ImageSkia;
18 class Rect; 18 class Rect;
19 class Vector2d; 19 class Vector2d;
20 } 20 }
21 21
22 namespace content { 22 namespace content {
23 class RenderFrameHost; 23 class RenderFrameHost;
24 class RenderWidgetHostImpl;
24 struct ContextMenuParams; 25 struct ContextMenuParams;
25 struct DropData; 26 struct DropData;
26 struct MenuItem; 27 struct MenuItem;
27 28
28 // This class provides a way for the RenderViewHost to reach out to its 29 // This class provides a way for the RenderViewHost to reach out to its
29 // delegate's view. It only needs to be implemented by embedders if they don't 30 // delegate's view.
30 // use the default WebContentsView implementations.
31 class CONTENT_EXPORT RenderViewHostDelegateView { 31 class CONTENT_EXPORT RenderViewHostDelegateView {
32 public: 32 public:
33 // A context menu should be shown, to be built using the context information 33 // A context menu should be shown, to be built using the context information
34 // provided in the supplied params. 34 // provided in the supplied params.
35 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, 35 virtual void ShowContextMenu(RenderFrameHost* render_frame_host,
36 const ContextMenuParams& params) {} 36 const ContextMenuParams& params) {}
37 37
38 // The user started dragging content of the specified type within the 38 // The user started dragging content of the specified type within the
39 // RenderView. Contextual information about the dragged content is supplied 39 // RenderView. Contextual information about the dragged content is supplied
40 // by DropData. If the delegate's view cannot start the drag for /any/ 40 // by DropData. If the delegate's view cannot start the drag for /any/
41 // reason, it must inform the renderer that the drag has ended; otherwise, 41 // reason, it must inform the renderer that the drag has ended; otherwise,
42 // this results in bugs like http://crbug.com/157134. 42 // this results in bugs like http://crbug.com/157134.
43 virtual void StartDragging(const DropData& drop_data, 43 virtual void StartDragging(const DropData& drop_data,
44 blink::WebDragOperationsMask allowed_ops, 44 blink::WebDragOperationsMask allowed_ops,
45 const gfx::ImageSkia& image, 45 const gfx::ImageSkia& image,
46 const gfx::Vector2d& image_offset, 46 const gfx::Vector2d& image_offset,
47 const DragEventSourceInfo& event_info) {} 47 const DragEventSourceInfo& event_info,
48 RenderWidgetHostImpl* source_rwh) {}
48 49
49 // The page wants to update the mouse cursor during a drag & drop operation. 50 // The page wants to update the mouse cursor during a drag & drop operation.
50 // |operation| describes the current operation (none, move, copy, link.) 51 // |operation| describes the current operation (none, move, copy, link.)
51 virtual void UpdateDragCursor(blink::WebDragOperation operation) {} 52 virtual void UpdateDragCursor(blink::WebDragOperation operation) {}
52 53
53 // Notification that view for this delegate got the focus. 54 // Notification that view for this delegate got the focus.
54 virtual void GotFocus() {} 55 virtual void GotFocus() {}
55 56
56 // Callback to inform the browser that the page is returning the focus to 57 // Callback to inform the browser that the page is returning the focus to
57 // the browser's chrome. If reverse is true, it means the focus was 58 // the browser's chrome. If reverse is true, it means the focus was
(...skipping 17 matching lines...) Expand all
75 virtual void HidePopupMenu() {}; 76 virtual void HidePopupMenu() {};
76 #endif 77 #endif
77 78
78 protected: 79 protected:
79 virtual ~RenderViewHostDelegateView() {} 80 virtual ~RenderViewHostDelegateView() {}
80 }; 81 };
81 82
82 } // namespace content 83 } // namespace content
83 84
84 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ 85 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698