diff options
Diffstat (limited to 'WebKit/chromium/public/WebViewClient.h')
| -rw-r--r-- | WebKit/chromium/public/WebViewClient.h | 84 |
1 files changed, 77 insertions, 7 deletions
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h index 4d272bb..c64418b 100644 --- a/WebKit/chromium/public/WebViewClient.h +++ b/WebKit/chromium/public/WebViewClient.h @@ -35,6 +35,7 @@ #include "WebEditingAction.h" #include "WebFileChooserCompletion.h" #include "WebFileChooserParams.h" +#include "WebPopupType.h" #include "WebString.h" #include "WebTextAffinity.h" #include "WebTextDirection.h" @@ -43,12 +44,20 @@ namespace WebKit { class WebAccessibilityObject; +class WebDeviceOrientationClient; class WebDragData; +class WebElement; class WebFileChooserCompletion; class WebFrame; +class WebGeolocationService; +class WebImage; +class WebInputElement; +class WebKeyboardEvent; class WebNode; class WebNotificationPresenter; class WebRange; +class WebSpeechInputController; +class WebSpeechInputListener; class WebStorageNamespace; class WebURL; class WebView; @@ -57,6 +66,7 @@ struct WebConsoleMessage; struct WebContextMenuData; struct WebPoint; struct WebPopupMenuInfo; +struct WebWindowFeatures; // Since a WebView is a WebWidget, a WebViewClient is a WebWidgetClient. // Virtual inheritance allows an implementation of WebWidgetClient to be @@ -68,15 +78,17 @@ public: // Create a new related WebView. This method must clone its session storage // so any subsequent calls to createSessionStorageNamespace conform to the // WebStorage specification. - virtual WebView* createView(WebFrame* creator) { return 0; } + virtual WebView* createView(WebFrame* creator, + const WebWindowFeatures& features, + const WebString& name) { return 0; } // Create a new WebPopupMenu. In the second form, the client is // responsible for rendering the contents of the popup menu. - virtual WebWidget* createPopupMenu(bool activatable) { return 0; } + virtual WebWidget* createPopupMenu(WebPopupType) { return 0; } virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; } // Create a session storage namespace object associated with this WebView. - virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; } + virtual WebStorageNamespace* createSessionStorageNamespace(unsigned quota) { return 0; } // Misc ---------------------------------------------------------------- @@ -119,7 +131,6 @@ public: virtual bool isSmartInsertDeleteEnabled() { return true; } virtual bool isSelectTrailingWhitespaceEnabled() { return true; } - virtual void setInputMethodEnabled(bool enabled) { } virtual void didBeginEditing() { } virtual void didChangeSelection(bool isSelectionEmpty) { } @@ -127,6 +138,12 @@ public: virtual void didExecuteCommand(const WebString& commandName) { } virtual void didEndEditing() { } + // These methods are called when the users edits a text-field. + virtual void textFieldDidBeginEditing(const WebInputElement&) { } + virtual void textFieldDidEndEditing(const WebInputElement&) { } + virtual void textFieldDidChange(const WebInputElement&) { } + virtual void textFieldDidReceiveKeyDown(const WebInputElement&, const WebKeyboardEvent&) { } + // This method is called in response to WebView's handleInputEvent() // when the default action for the current keyboard event is not // suppressed by the page, to give the embedder a chance to handle @@ -197,6 +214,9 @@ public: virtual bool runModalBeforeUnloadDialog( WebFrame*, const WebString& message) { return true; } + virtual bool supportsFullscreen() { return false; } + virtual void enterFullscreenForNode(const WebNode&) { } + virtual void exitFullscreenForNode(const WebNode&) { } // UI ------------------------------------------------------------------ @@ -218,7 +238,7 @@ public: // Called when a drag-n-drop operation should begin. virtual void startDragging( - const WebPoint& from, const WebDragData&, WebDragOperationsMask) { } + const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint&) { } // Called to determine if drag-n-drop operations may initiate a page // navigation. @@ -229,6 +249,9 @@ public: virtual void focusNext() { } virtual void focusPrevious() { } + // Called when a new node gets focused. + virtual void focusedNodeChanged(const WebNode&) { } + // Session history ----------------------------------------------------- @@ -262,8 +285,10 @@ public: // changed and should be saved. See WebView::inspectorSettings. virtual void didUpdateInspectorSettings() { } + virtual void didUpdateInspectorSetting(const WebString& key, const WebString& value) { } - // Autofill ------------------------------------------------------------ + + // AutoFill ------------------------------------------------------------ // Queries the browser for suggestions to be shown for the form text // field named |name|. |value| is the text entered by the user so @@ -272,11 +297,56 @@ public: const WebString& name, const WebString& value) { } - // Instructs the browser to remove the autofill entry specified from + // Instructs the browser to remove the Autocomplete entry specified from // its DB. + // FIXME: This method should be named removeAutocompleteSugestion. virtual void removeAutofillSuggestions(const WebString& name, const WebString& value) { } + // Informs the browser that the user has accepted an AutoFill suggestion for + // a WebNode. |name| and |label| form a key into the set of AutoFill + // profiles. |index| is an index of the selected suggestion in the list of + // suggestions provided by the client + virtual void didAcceptAutoFillSuggestion(const WebNode&, + const WebString& name, + const WebString& label, + int uniqueID, + unsigned index) { } + + // Informs the browser that the user has selected an AutoFill suggestion for + // a WebNode. This happens when the user hovers over a suggestion or uses + // the arrow keys to navigate to a suggestion. + virtual void didSelectAutoFillSuggestion(const WebNode&, + const WebString& name, + const WebString& label, + int uniqueID) { } + + // Informs the browser that the user has cleared the selection from the + // AutoFill suggestions popup. This happens when a user uses the arrow + // keys to navigate outside the range of possible selections. + virtual void didClearAutoFillSelection(const WebNode&) { } + + // Informs the browser that the user has selected an autocomplete (password + // or field) suggestion from the drop-down. The input element text has + // already been set to the selected suggestion. + virtual void didAcceptAutocompleteSuggestion(const WebInputElement&) { } + + // Geolocation --------------------------------------------------------- + + // Access the embedder API for geolocation services. + virtual WebGeolocationService* geolocationService() { return 0; } + + // Speech -------------------------------------------------------------- + + // Access the embedder API for speech input services. + virtual WebSpeechInputController* speechInputController( + WebSpeechInputListener*) { return 0; } + + // Device Orientation -------------------------------------------------- + + // Access the embedder API for device orientation services. + virtual WebDeviceOrientationClient* deviceOrientationClient() { return 0; } + protected: ~WebViewClient() { } }; |
