| Index: webkit/glue/webview_delegate.h
|
| ===================================================================
|
| --- webkit/glue/webview_delegate.h (revision 26230)
|
| +++ webkit/glue/webview_delegate.h (working copy)
|
| @@ -31,7 +31,7 @@
|
| #include "webkit/api/public/WebDragOperation.h"
|
| #include "webkit/api/public/WebFrame.h"
|
| #include "webkit/api/public/WebTextDirection.h"
|
| -#include "webkit/api/public/WebWidgetClient.h"
|
| +#include "webkit/api/public/WebViewClient.h"
|
| #include "webkit/glue/context_menu.h"
|
|
|
| namespace WebCore {
|
| @@ -65,42 +65,11 @@
|
| DISALLOW_COPY_AND_ASSIGN(WebFileChooserCallback);
|
| };
|
|
|
| -
|
| -// Inheritance here is somewhat weird, but since a WebView is a WebWidget,
|
| -// it makes sense that a WebViewDelegate is a WebWidgetClient.
|
| -class WebViewDelegate : virtual public WebKit::WebWidgetClient {
|
| +// TODO(darin): Eliminate WebViewDelegate in favor of WebViewClient.
|
| +class WebViewDelegate : public WebKit::WebViewClient {
|
| public:
|
| // WebView additions -------------------------------------------------------
|
|
|
| - // This method is called to create a new WebView. The WebView should not be
|
| - // made visible until the new WebView's Delegate has its Show method called.
|
| - // The returned WebView pointer is assumed to be owned by the host window,
|
| - // and the caller of CreateWebView should not release the given WebView.
|
| - // |user_gesture| is true if a user action initiated this call.
|
| - // |creator_url|, if nonempty, holds the security origin of the page creating
|
| - // this WebView.
|
| - virtual WebView* CreateWebView(WebView* webview,
|
| - bool user_gesture,
|
| - const GURL& creator_url) {
|
| - return NULL;
|
| - }
|
| -
|
| - // This method is called to create a new WebWidget to act as a popup
|
| - // (like a drop-down menu).
|
| - virtual WebKit::WebWidget* CreatePopupWidget(
|
| - WebView* webview,
|
| - bool activatable) {
|
| - return NULL;
|
| - }
|
| -
|
| - // Like CreatePopupWidget, except the actual widget is rendered by the
|
| - // embedder using the supplied info.
|
| - virtual WebKit::WebWidget* CreatePopupWidgetWithInfo(
|
| - WebView* webview,
|
| - const WebKit::WebPopupMenuInfo& info) {
|
| - return NULL;
|
| - }
|
| -
|
| // Notifies how many matches have been found so far, for a given request_id.
|
| // |final_update| specifies whether this is the last update (all frames have
|
| // completed scoping).
|
| @@ -139,14 +108,6 @@
|
| return true;
|
| }
|
|
|
| - // Notifies the delegate that a load has begun.
|
| - virtual void DidStartLoading(WebView* webview) {
|
| - }
|
| -
|
| - // Notifies the delegate that all loads are finished.
|
| - virtual void DidStopLoading(WebView* webview) {
|
| - }
|
| -
|
| // Notifies that a new script context has been created for this frame.
|
| // This is similar to WindowObjectCleared but only called once per frame
|
| // context.
|
| @@ -163,16 +124,6 @@
|
|
|
| // ChromeClient ------------------------------------------------------------
|
|
|
| - // Appends a line to the application's error console. The message contains
|
| - // an error description or other information, the line_no provides a line
|
| - // number (e.g. for a JavaScript error report), and the source_id contains
|
| - // a URL or other description of the source of the message.
|
| - virtual void AddMessageToConsole(WebView* webview,
|
| - const std::wstring& message,
|
| - unsigned int line_no,
|
| - const std::wstring& source_id) {
|
| - }
|
| -
|
| // Queries the browser for suggestions to be shown for the form text field
|
| // named |field_name|. |text| is the text entered by the user so far and
|
| // |node_id| is the id of the node of the input field.
|
| @@ -194,57 +145,6 @@
|
|
|
| // UIDelegate --------------------------------------------------------------
|
|
|
| - // Displays a JavaScript alert panel associated with the given view. Clients
|
| - // should visually indicate that this panel comes from JavaScript and some
|
| - // information about the originating frame (at least the domain). The panel
|
| - // should have a single OK button.
|
| - virtual void RunJavaScriptAlert(WebKit::WebFrame* webframe,
|
| - const std::wstring& message) {
|
| - }
|
| -
|
| - // Displays a JavaScript confirm panel associated with the given view.
|
| - // Clients should visually indicate that this panel comes
|
| - // from JavaScript. The panel should have two buttons, e.g. "OK" and
|
| - // "Cancel". Returns true if the user hit OK, or false if the user hit Cancel.
|
| - virtual bool RunJavaScriptConfirm(WebKit::WebFrame* webframe,
|
| - const std::wstring& message) {
|
| - return false;
|
| - }
|
| -
|
| - // Displays a JavaScript text input panel associated with the given view.
|
| - // Clients should visually indicate that this panel comes from JavaScript.
|
| - // The panel should have two buttons, e.g. "OK" and "Cancel", and an area to
|
| - // type text. The default_value should appear as the initial text in the
|
| - // panel when it is shown. If the user hit OK, returns true and fills result
|
| - // with the text in the box. The value of result is undefined if the user
|
| - // hit Cancel.
|
| - virtual bool RunJavaScriptPrompt(WebKit::WebFrame* webframe,
|
| - const std::wstring& message,
|
| - const std::wstring& default_value,
|
| - std::wstring* result) {
|
| - return false;
|
| - }
|
| -
|
| - // Sets the status bar text.
|
| - virtual void SetStatusbarText(WebView* webview,
|
| - const std::wstring& message) { }
|
| -
|
| - // Displays a "before unload" confirm panel associated with the given view.
|
| - // The panel should have two buttons, e.g. "OK" and "Cancel", where OK means
|
| - // that the navigation should continue, and Cancel means that the navigation
|
| - // should be cancelled, leaving the user on the current page. Returns true
|
| - // if the user hit OK, or false if the user hit Cancel.
|
| - virtual bool RunBeforeUnloadConfirm(WebKit::WebFrame* webframe,
|
| - const std::wstring& message) {
|
| - return true; // OK, continue to navigate away
|
| - }
|
| -
|
| - // Tells the client that we're hovering over a link with a given URL,
|
| - // if the node is not a link, the URL will be an empty GURL.
|
| - virtual void UpdateTargetURL(WebView* webview,
|
| - const GURL& url) {
|
| - }
|
| -
|
| // Called to display a file chooser prompt. The prompt should be pre-
|
| // populated with the given initial_filename string. The WebViewDelegate
|
| // will own the WebFileChooserCallback object and is responsible for
|
| @@ -295,24 +195,6 @@
|
| const std::string& frame_charset) {
|
| }
|
|
|
| - // Starts a drag session with the supplied contextual information.
|
| - // webview: The WebView sending the delegate method.
|
| - // mouseCoords: Current mouse coordinates
|
| - // drop_data: a WebDropData struct which should contain all the necessary
|
| - // information for dragging data out of the webview.
|
| - // drag_source_operation_mask: indicates what drag operations are allowed
|
| - virtual void StartDragging(WebView* webview,
|
| - const WebKit::WebPoint &mouseCoords,
|
| - const WebKit::WebDragData& drag_data,
|
| - WebKit::WebDragOperationsMask operations_mask) {
|
| - }
|
| -
|
| - // Returns the focus to the client.
|
| - // reverse: Whether the focus should go to the previous (if true) or the next
|
| - // focusable element.
|
| - virtual void TakeFocus(WebView* webview, bool reverse) {
|
| - }
|
| -
|
| // Notification that a user metric has occurred.
|
| virtual void UserMetricsRecordAction(const std::wstring& action) { }
|
|
|
| @@ -331,27 +213,6 @@
|
|
|
| // History Related ---------------------------------------------------------
|
|
|
| - // Tells the embedder to navigate back or forward in session history by the
|
| - // given offset (relative to the current position in session history).
|
| - virtual void NavigateBackForwardSoon(int offset) {
|
| - }
|
| -
|
| - // Returns how many entries are in the back and forward lists, respectively.
|
| - virtual int GetHistoryBackListCount() {
|
| - return 0;
|
| - }
|
| - virtual int GetHistoryForwardListCount() {
|
| - return 0;
|
| - }
|
| -
|
| - // -------------------------------------------------------------------------
|
| -
|
| - // Tell the delegate the tooltip text and its directionality hint for the
|
| - // current mouse position.
|
| - virtual void SetTooltipText(WebView* webview,
|
| - const std::wstring& tooltip_text,
|
| - WebKit::WebTextDirection text_direction_hint) { }
|
| -
|
| // InspectorClient ---------------------------------------------------------
|
|
|
| virtual void UpdateInspectorSettings(const std::wstring& raw_settings) { }
|
| @@ -390,13 +251,6 @@
|
| // Update the spelling panel with the |word|.
|
| virtual void UpdateSpellingUIWithMisspelledWord(const std::wstring& word) { }
|
|
|
| - // Asks the user to print the page or a specific frame. Called in response to
|
| - // a window.print() call.
|
| - virtual void ScriptedPrint(WebKit::WebFrame* frame) { }
|
| -
|
| - // Called when an item was added to the history
|
| - virtual void DidAddHistoryItem() { }
|
| -
|
| // The "CurrentKeyboardEvent" refers to the keyboard event passed to
|
| // WebView's handleInputEvent method.
|
| //
|
|
|