Chromium Code Reviews| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 WebLayer; | 58 class WebLayer; |
| 59 struct WebWindowFeatures; | 59 struct WebWindowFeatures; |
| 60 class WebGestureEvent; | |
| 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. |
| 68 class CONTENT_EXPORT WebContentsDelegate { | 69 class CONTENT_EXPORT WebContentsDelegate { |
| 69 public: | 70 public: |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 virtual void HandleKeyboardEvent(WebContents* source, | 265 virtual void HandleKeyboardEvent(WebContents* source, |
| 265 const NativeWebKeyboardEvent& event) {} | 266 const NativeWebKeyboardEvent& event) {} |
| 266 | 267 |
| 267 virtual void HandleMouseDown() {} | 268 virtual void HandleMouseDown() {} |
| 268 virtual void HandleMouseUp() {} | 269 virtual void HandleMouseUp() {} |
| 269 | 270 |
| 270 // Handles activation resulting from a pointer event (e.g. when mouse is | 271 // Handles activation resulting from a pointer event (e.g. when mouse is |
| 271 // pressed, or a touch-gesture begins). | 272 // pressed, or a touch-gesture begins). |
| 272 virtual void HandlePointerActivate() {} | 273 virtual void HandlePointerActivate() {} |
| 273 | 274 |
| 275 virtual bool PreHandleGestureEvent(WebContents* source, | |
|
jam
2014/01/14 17:02:45
nit: add comment
bokan
2014/01/14 18:49:05
Done.
| |
| 276 const blink::WebGestureEvent& event); | |
|
jam
2014/01/14 17:02:45
nit: indentation
bokan
2014/01/14 18:49:05
Done.
| |
| 277 | |
| 274 virtual void HandleGestureBegin() {} | 278 virtual void HandleGestureBegin() {} |
| 275 virtual void HandleGestureEnd() {} | 279 virtual void HandleGestureEnd() {} |
| 276 | 280 |
| 277 // Called when an external drag event enters the web contents window. Return | 281 // Called when an external drag event enters the web contents window. Return |
| 278 // true to allow dragging and dropping on the web contents window or false to | 282 // true to allow dragging and dropping on the web contents window or false to |
| 279 // cancel the operation. This method is used by Chromium Embedded Framework. | 283 // cancel the operation. This method is used by Chromium Embedded Framework. |
| 280 virtual bool CanDragEnter(WebContents* source, | 284 virtual bool CanDragEnter(WebContents* source, |
| 281 const DropData& data, | 285 const DropData& data, |
| 282 blink::WebDragOperationsMask operations_allowed); | 286 blink::WebDragOperationsMask operations_allowed); |
| 283 | 287 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 // Called when |this| is no longer the WebContentsDelegate for |source|. | 478 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 475 void Detach(WebContents* source); | 479 void Detach(WebContents* source); |
| 476 | 480 |
| 477 // The WebContents that this is currently a delegate for. | 481 // The WebContents that this is currently a delegate for. |
| 478 std::set<WebContents*> attached_contents_; | 482 std::set<WebContents*> attached_contents_; |
| 479 }; | 483 }; |
| 480 | 484 |
| 481 } // namespace content | 485 } // namespace content |
| 482 | 486 |
| 483 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 487 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |