OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 // WebCore provides hooks for several kinds of functionality, allowing separate | 5 // WebCore provides hooks for several kinds of functionality, allowing separate |
6 // classes termed "delegates" to receive notifications (in the form of direct | 6 // classes termed "delegates" to receive notifications (in the form of direct |
7 // function calls) when certain events are about to occur or have just occurred. | 7 // function calls) when certain events are about to occur or have just occurred. |
8 // In some cases, the delegate implements the needed functionality; in others, | 8 // In some cases, the delegate implements the needed functionality; in others, |
9 // the delegate has some control over the behavior but doesn't actually | 9 // the delegate has some control over the behavior but doesn't actually |
10 // implement it. For example, the UI delegate is responsible for showing a | 10 // implement it. For example, the UI delegate is responsible for showing a |
(...skipping 10 matching lines...) Expand all Loading... |
21 // the needed functionality of the WebKit UIDelegate, ContextMenuDelegate, | 21 // the needed functionality of the WebKit UIDelegate, ContextMenuDelegate, |
22 // PolicyDelegate, FrameLoadDelegate, and EditorDelegate; additional portions | 22 // PolicyDelegate, FrameLoadDelegate, and EditorDelegate; additional portions |
23 // of ChromeClient and FrameLoaderClient not delegated in the WebKit | 23 // of ChromeClient and FrameLoaderClient not delegated in the WebKit |
24 // implementation; and some WebView additions. | 24 // implementation; and some WebView additions. |
25 | 25 |
26 #ifndef WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ | 26 #ifndef WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ |
27 #define WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ | 27 #define WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ |
28 | 28 |
29 #include <vector> | 29 #include <vector> |
30 | 30 |
| 31 #include "webkit/api/public/WebDragOperation.h" |
31 #include "webkit/api/public/WebFrame.h" | 32 #include "webkit/api/public/WebFrame.h" |
32 #include "webkit/api/public/WebNavigationPolicy.h" | 33 #include "webkit/api/public/WebNavigationPolicy.h" |
33 #include "webkit/api/public/WebNavigationType.h" | 34 #include "webkit/api/public/WebNavigationType.h" |
34 #include "webkit/api/public/WebTextDirection.h" | 35 #include "webkit/api/public/WebTextDirection.h" |
35 #include "webkit/api/public/WebWidgetClient.h" | 36 #include "webkit/api/public/WebWidgetClient.h" |
36 #include "webkit/glue/context_menu.h" | 37 #include "webkit/glue/context_menu.h" |
37 | 38 |
38 namespace webkit_glue { | 39 namespace webkit_glue { |
39 class WebMediaPlayerDelegate; | 40 class WebMediaPlayerDelegate; |
40 struct WebPluginGeometry; | 41 struct WebPluginGeometry; |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 const ContextMenuMediaParams& media_params, | 633 const ContextMenuMediaParams& media_params, |
633 const std::wstring& selection_text, | 634 const std::wstring& selection_text, |
634 const std::wstring& misspelled_word, | 635 const std::wstring& misspelled_word, |
635 int edit_flags, | 636 int edit_flags, |
636 const std::string& security_info, | 637 const std::string& security_info, |
637 const std::string& frame_charset) { | 638 const std::string& frame_charset) { |
638 } | 639 } |
639 | 640 |
640 // Starts a drag session with the supplied contextual information. | 641 // Starts a drag session with the supplied contextual information. |
641 // webview: The WebView sending the delegate method. | 642 // webview: The WebView sending the delegate method. |
| 643 // mouseCoords: Current mouse coordinates |
642 // drop_data: a WebDropData struct which should contain all the necessary | 644 // drop_data: a WebDropData struct which should contain all the necessary |
643 // information for dragging data out of the webview. | 645 // information for dragging data out of the webview. |
| 646 // drag_source_operation_mask: indicates what drag operations are allowed |
644 virtual void StartDragging(WebView* webview, | 647 virtual void StartDragging(WebView* webview, |
645 const WebKit::WebDragData& drag_data) { | 648 const WebKit::WebPoint &mouseCoords, |
| 649 const WebKit::WebDragData& drag_data, |
| 650 WebKit::WebDragOperationsMask operations_mask) { |
646 } | 651 } |
647 | 652 |
648 // Returns the focus to the client. | 653 // Returns the focus to the client. |
649 // reverse: Whether the focus should go to the previous (if true) or the next | 654 // reverse: Whether the focus should go to the previous (if true) or the next |
650 // focusable element. | 655 // focusable element. |
651 virtual void TakeFocus(WebView* webview, bool reverse) { | 656 virtual void TakeFocus(WebView* webview, bool reverse) { |
652 } | 657 } |
653 | 658 |
654 // Displays JS out-of-memory warning in the infobar | 659 // Displays JS out-of-memory warning in the infobar |
655 virtual void JSOutOfMemory() { | 660 virtual void JSOutOfMemory() { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 // Called when an item was added to the history | 826 // Called when an item was added to the history |
822 virtual void DidAddHistoryItem() { } | 827 virtual void DidAddHistoryItem() { } |
823 | 828 |
824 WebViewDelegate() { } | 829 WebViewDelegate() { } |
825 | 830 |
826 protected: | 831 protected: |
827 ~WebViewDelegate() { } | 832 ~WebViewDelegate() { } |
828 }; | 833 }; |
829 | 834 |
830 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ | 835 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ |
OLD | NEW |