OLD | NEW |
---|---|
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_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 // either in a drop or by being cancelled. | 123 // either in a drop or by being cancelled. |
124 virtual void DragSourceEndedAt( | 124 virtual void DragSourceEndedAt( |
125 int client_x, int client_y, int screen_x, int screen_y, | 125 int client_x, int client_y, int screen_x, int screen_y, |
126 blink::WebDragOperation operation) = 0; | 126 blink::WebDragOperation operation) = 0; |
127 | 127 |
128 // Notifies the renderer that we're done with the drag and drop operation. | 128 // Notifies the renderer that we're done with the drag and drop operation. |
129 // This allows the renderer to reset some state. | 129 // This allows the renderer to reset some state. |
130 virtual void DragSourceSystemDragEnded() = 0; | 130 virtual void DragSourceSystemDragEnded() = 0; |
131 | 131 |
132 // D&d drop target messages that get sent to WebKit. | 132 // D&d drop target messages that get sent to WebKit. |
133 // On Android, drop data is not available at DragTargetDragEnter. So only a | |
134 // dummy drop_data with the data format is passed. On Aura, the drop data is | |
135 // available and passed in here. | |
dcheng
2016/03/30 08:40:02
I think there's no need to mention Android vs non-
hush (inactive)
2016/04/06 22:47:51
I will remove this comment.
| |
133 virtual void DragTargetDragEnter( | 136 virtual void DragTargetDragEnter( |
134 const DropData& drop_data, | 137 const DropData& drop_data, |
135 const gfx::Point& client_pt, | 138 const gfx::Point& client_pt, |
136 const gfx::Point& screen_pt, | 139 const gfx::Point& screen_pt, |
137 blink::WebDragOperationsMask operations_allowed, | 140 blink::WebDragOperationsMask operations_allowed, |
138 int key_modifiers) = 0; | 141 int key_modifiers) = 0; |
139 virtual void DragTargetDragOver( | 142 virtual void DragTargetDragOver( |
140 const gfx::Point& client_pt, | 143 const gfx::Point& client_pt, |
141 const gfx::Point& screen_pt, | 144 const gfx::Point& screen_pt, |
142 blink::WebDragOperationsMask operations_allowed, | 145 blink::WebDragOperationsMask operations_allowed, |
143 int key_modifiers) = 0; | 146 int key_modifiers) = 0; |
144 virtual void DragTargetDragLeave() = 0; | 147 virtual void DragTargetDragLeave() = 0; |
145 virtual void DragTargetDrop(const gfx::Point& client_pt, | 148 // Drop data is only valid on Android during DragTargetDrop because this is |
149 // the only time when drop data is accessible on Andorid. | |
150 // http://developer.android.com/reference/android/view/DragEvent.html | |
151 // On Aura, drop data at this time will be the same as it was in DragEnter, | |
152 // and an invalid drop data will be passed down to indicate reusing the drop | |
153 // data from DragEnter. | |
dcheng
2016/03/30 08:40:02
Is this comment still accurate?
hush (inactive)
2016/04/06 22:47:51
Nope. Removed.
| |
154 virtual void DragTargetDrop(const DropData& drop_data, | |
155 const gfx::Point& client_pt, | |
146 const gfx::Point& screen_pt, | 156 const gfx::Point& screen_pt, |
147 int key_modifiers) = 0; | 157 int key_modifiers) = 0; |
148 | 158 |
149 // Instructs the RenderView to automatically resize and send back updates | 159 // Instructs the RenderView to automatically resize and send back updates |
150 // for the new size. | 160 // for the new size. |
151 virtual void EnableAutoResize(const gfx::Size& min_size, | 161 virtual void EnableAutoResize(const gfx::Size& min_size, |
152 const gfx::Size& max_size) = 0; | 162 const gfx::Size& max_size) = 0; |
153 | 163 |
154 // Turns off auto-resize and gives a new size that the view should be. | 164 // Turns off auto-resize and gives a new size that the view should be. |
155 virtual void DisableAutoResize(const gfx::Size& new_size) = 0; | 165 virtual void DisableAutoResize(const gfx::Size& new_size) = 0; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 | 228 |
219 private: | 229 private: |
220 // This interface should only be implemented inside content. | 230 // This interface should only be implemented inside content. |
221 friend class RenderViewHostImpl; | 231 friend class RenderViewHostImpl; |
222 RenderViewHost() {} | 232 RenderViewHost() {} |
223 }; | 233 }; |
224 | 234 |
225 } // namespace content | 235 } // namespace content |
226 | 236 |
227 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ | 237 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
OLD | NEW |