diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 22:38:45 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 22:38:45 +0000 |
commit | f40b49e10c5ad2a4aa360a20e467442fca29e315 (patch) | |
tree | cbd752f0db9dca4dfff4fd927832444d163a3ea2 /webkit | |
parent | 1f56867b48fe971a729df346ef3ac750de73969d (diff) | |
download | chromium_src-f40b49e10c5ad2a4aa360a20e467442fca29e315.zip chromium_src-f40b49e10c5ad2a4aa360a20e467442fca29e315.tar.gz chromium_src-f40b49e10c5ad2a4aa360a20e467442fca29e315.tar.bz2 |
Switch over to non-deprecated WebKit APIs and delete client methods that are no
longer called by WebKit.
R=jhawkins
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1995002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/dom_operations.cc | 14 | ||||
-rw-r--r-- | webkit/glue/form_field.cc | 5 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_impl.cc | 2 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.cc | 4 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.h | 1 | ||||
-rw-r--r-- | webkit/glue/webpasswordautocompletelistener_impl.cc | 3 |
6 files changed, 12 insertions, 17 deletions
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc index 982bbba..d5058ea 100644 --- a/webkit/glue/dom_operations.cc +++ b/webkit/glue/dom_operations.cc @@ -138,7 +138,7 @@ void GetAllSavableResourceLinksForFrame(WebFrame* current_frame, // We only save HTML resources. if (!node.isElementNode()) continue; - WebElement element = node.toElement<WebElement>(); + WebElement element = node.to<WebElement>(); GetSavableResourceLinkForElement(element, current_doc, unique_check, @@ -221,7 +221,7 @@ static bool FindFormInputElements(WebFormElement* fe, // matching elements it can get at them through the FormElement*. // Note: This assignment adds a reference to the InputElement. result->input_elements[data.fields[j].name()] = - temp_elements[0].toElement<WebInputElement>(); + temp_elements[0].to<WebInputElement>(); } return true; } @@ -256,7 +256,7 @@ static void FindFormElements(WebView* view, for (size_t i = 0; i < forms.size(); ++i) { WebFormElement fe = forms[i]; // Action URL must match. - GURL full_action(f->completeURL(fe.action())); + GURL full_action(f->document().completeURL(fe.action())); if (data.action != full_action.ReplaceComponents(rep)) continue; @@ -298,7 +298,7 @@ void FillPasswordForm(WebView* view, WebInputElement password_element = form_elements->input_elements[data.basic_data.fields[1].name()]; - username_element.frame()->registerPasswordListener( + username_element.document().frame()->registerPasswordListener( username_element, new WebPasswordAutocompleteListenerImpl( new WebInputElementDelegate(username_element), @@ -313,7 +313,7 @@ WebString GetSubResourceLinkFromElement(const WebElement& element) { element.hasTagName("script")) { attribute_name = "src"; } else if (element.hasTagName("input")) { - const WebInputElement input = element.toConstElement<WebInputElement>(); + const WebInputElement input = element.toConst<WebInputElement>(); if (input.inputType() == WebInputElement::Image) { attribute_name = "src"; } @@ -494,7 +494,7 @@ void GetApplicationInfo(WebView* view, WebApplicationInfo* app_info) { WebNode child = children.item(i); if (!child.isElementNode()) continue; - WebElement elem = child.toElement<WebElement>(); + WebElement elem = child.to<WebElement>(); if (elem.hasTagName("link")) { std::string rel = elem.getAttribute("rel").utf8(); @@ -577,7 +577,7 @@ bool ElementDoesAutoCompleteForElementWithId(WebView* view, if (element.isNull() || !element.hasTagName("input")) return false; - WebInputElement input_element = element.toElement<WebInputElement>(); + WebInputElement input_element = element.to<WebInputElement>(); return input_element.autoComplete(); } diff --git a/webkit/glue/form_field.cc b/webkit/glue/form_field.cc index a82283a..069c6c3 100644 --- a/webkit/glue/form_field.cc +++ b/webkit/glue/form_field.cc @@ -29,11 +29,10 @@ FormField::FormField(WebFormControlElement element) { form_control_type_ = element.formControlType(); if (form_control_type_ == ASCIIToUTF16("text")) { - const WebInputElement& input_element = - element.toConstElement<WebInputElement>(); + const WebInputElement& input_element = element.toConst<WebInputElement>(); value_ = input_element.value(); } else if (form_control_type_ == ASCIIToUTF16("select-one")) { - WebSelectElement select_element = element.toElement<WebSelectElement>(); + WebSelectElement select_element = element.to<WebSelectElement>(); value_ = select_element.value(); } diff --git a/webkit/glue/plugins/webplugin_impl.cc b/webkit/glue/plugins/webplugin_impl.cc index 20d1907..30c2fa3 100644 --- a/webkit/glue/plugins/webplugin_impl.cc +++ b/webkit/glue/plugins/webplugin_impl.cc @@ -484,7 +484,7 @@ GURL WebPluginImpl::CompleteURL(const char* url) { return GURL(); } // TODO(darin): Is conversion from UTF8 correct here? - return webframe_->completeURL(WebString::fromUTF8(url)); + return webframe_->document().completeURL(WebString::fromUTF8(url)); } void WebPluginImpl::CancelResource(unsigned long id) { diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc index 781eafc..bedae2d 100644 --- a/webkit/glue/webkitclient_impl.cc +++ b/webkit/glue/webkitclient_impl.cc @@ -332,10 +332,6 @@ void WebKitClientImpl::stopSharedTimer() { shared_timer_.Stop(); } -void WebKitClientImpl::callOnMainThread(void (*func)()) { - main_loop_->PostTask(FROM_HERE, NewRunnableFunction(func)); -} - void WebKitClientImpl::callOnMainThread(void (*func)(void*), void* context) { main_loop_->PostTask(FROM_HERE, NewRunnableFunction(func, context)); } diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h index 0f3ee75..a6bdad5 100644 --- a/webkit/glue/webkitclient_impl.h +++ b/webkit/glue/webkitclient_impl.h @@ -68,7 +68,6 @@ class WebKitClientImpl : public WebKit::WebKitClient { virtual void setSharedTimerFiredFunction(void (*func)()); virtual void setSharedTimerFireTime(double fireTime); virtual void stopSharedTimer(); - virtual void callOnMainThread(void (*func)()); virtual void callOnMainThread(void (*func)(void*), void* context); void SuspendSharedTimer(); diff --git a/webkit/glue/webpasswordautocompletelistener_impl.cc b/webkit/glue/webpasswordautocompletelistener_impl.cc index 60d46ee5..d6ba4ab 100644 --- a/webkit/glue/webpasswordautocompletelistener_impl.cc +++ b/webkit/glue/webpasswordautocompletelistener_impl.cc @@ -10,6 +10,7 @@ #include <vector> #include "base/string_util.h" +#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h" @@ -51,7 +52,7 @@ void WebInputElementDelegate::OnFinishedAutocompleting() { void WebInputElementDelegate::RefreshAutofillPopup( const std::vector<string16>& suggestions, int default_suggestion_index) { - WebView* webview = element_.frame()->view(); + WebView* webview = element_.document().frame()->view(); if (webview) webview->applyAutocompleteSuggestions(element_, suggestions, default_suggestion_index); |