| 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_WEB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 struct SSLStatus; | 48 struct SSLStatus; |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace gfx { | 51 namespace gfx { |
| 52 class Point; | 52 class Point; |
| 53 class Rect; | 53 class Rect; |
| 54 class Size; | 54 class Size; |
| 55 } | 55 } |
| 56 | 56 |
| 57 namespace blink { | 57 namespace blink { |
| 58 class WebGestureEvent; |
| 58 class WebLayer; | 59 class WebLayer; |
| 59 struct WebWindowFeatures; | 60 struct WebWindowFeatures; |
| 60 } | 61 } |
| 61 | 62 |
| 62 namespace content { | 63 namespace content { |
| 63 | 64 |
| 64 struct OpenURLParams; | 65 struct OpenURLParams; |
| 65 | 66 |
| 66 // Objects implement this interface to get notified about changes in the | 67 // Objects implement this interface to get notified about changes in the |
| 67 // WebContents and to provide necessary functionality. | 68 // WebContents and to provide necessary functionality. |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 virtual void HandleKeyboardEvent(WebContents* source, | 252 virtual void HandleKeyboardEvent(WebContents* source, |
| 252 const NativeWebKeyboardEvent& event) {} | 253 const NativeWebKeyboardEvent& event) {} |
| 253 | 254 |
| 254 virtual void HandleMouseDown() {} | 255 virtual void HandleMouseDown() {} |
| 255 virtual void HandleMouseUp() {} | 256 virtual void HandleMouseUp() {} |
| 256 | 257 |
| 257 // Handles activation resulting from a pointer event (e.g. when mouse is | 258 // Handles activation resulting from a pointer event (e.g. when mouse is |
| 258 // pressed, or a touch-gesture begins). | 259 // pressed, or a touch-gesture begins). |
| 259 virtual void HandlePointerActivate() {} | 260 virtual void HandlePointerActivate() {} |
| 260 | 261 |
| 262 // Allows delegates to handle gesture events before sending to the renderer. |
| 263 // Returns true if the |event| was handled and thus shouldn't be processed |
| 264 // by the renderer's event handler. Note that the touch events that create |
| 265 // the gesture are always passed to the renderer since the gesture is created |
| 266 // and dispatched after the touches return without being "preventDefault()"ed. |
| 267 virtual bool PreHandleGestureEvent( |
| 268 WebContents* source, |
| 269 const blink::WebGestureEvent& event); |
| 270 |
| 261 virtual void HandleGestureBegin() {} | 271 virtual void HandleGestureBegin() {} |
| 262 virtual void HandleGestureEnd() {} | 272 virtual void HandleGestureEnd() {} |
| 263 | 273 |
| 264 // Called when an external drag event enters the web contents window. Return | 274 // Called when an external drag event enters the web contents window. Return |
| 265 // true to allow dragging and dropping on the web contents window or false to | 275 // true to allow dragging and dropping on the web contents window or false to |
| 266 // cancel the operation. This method is used by Chromium Embedded Framework. | 276 // cancel the operation. This method is used by Chromium Embedded Framework. |
| 267 virtual bool CanDragEnter(WebContents* source, | 277 virtual bool CanDragEnter(WebContents* source, |
| 268 const DropData& data, | 278 const DropData& data, |
| 269 blink::WebDragOperationsMask operations_allowed); | 279 blink::WebDragOperationsMask operations_allowed); |
| 270 | 280 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 // Called when |this| is no longer the WebContentsDelegate for |source|. | 473 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 464 void Detach(WebContents* source); | 474 void Detach(WebContents* source); |
| 465 | 475 |
| 466 // The WebContents that this is currently a delegate for. | 476 // The WebContents that this is currently a delegate for. |
| 467 std::set<WebContents*> attached_contents_; | 477 std::set<WebContents*> attached_contents_; |
| 468 }; | 478 }; |
| 469 | 479 |
| 470 } // namespace content | 480 } // namespace content |
| 471 | 481 |
| 472 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 482 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |