diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-08 05:06:47 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-08 05:06:47 +0000 |
commit | c5041c32539b375c15e85c824eb054891453521d (patch) | |
tree | 117fae2c96bc6b750f38a361d5832c277c843f14 /components | |
parent | ca93f9319e6c778f8b8d4b4a9c42f1f66aa0422b (diff) | |
download | chromium_src-c5041c32539b375c15e85c824eb054891453521d.zip chromium_src-c5041c32539b375c15e85c824eb054891453521d.tar.gz chromium_src-c5041c32539b375c15e85c824eb054891453521d.tar.bz2 |
Convert Chrome usages of WebFrame to WebLocalFrame.
This is a mechanical change to followup on Blink and content changes to
change parameter types to WebLocalFrame where appropriate.
BUG=346764
Review URL: https://codereview.chromium.org/226093007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
10 files changed, 34 insertions, 30 deletions
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc index 8d4e52ea..b07457e 100644 --- a/components/autofill/content/renderer/autofill_agent.cc +++ b/components/autofill/content/renderer/autofill_agent.cc @@ -54,6 +54,7 @@ using blink::WebFormElement; using blink::WebFrame; using blink::WebInputElement; using blink::WebKeyboardEvent; +using blink::WebLocalFrame; using blink::WebNode; using blink::WebOptionElement; using blink::WebString; @@ -166,7 +167,7 @@ bool AutofillAgent::OnMessageReceived(const IPC::Message& message) { return handled; } -void AutofillAgent::DidFinishDocumentLoad(WebFrame* frame) { +void AutofillAgent::DidFinishDocumentLoad(WebLocalFrame* frame) { // Record timestamp on document load. This is used to record overhead of // Autofill feature. forms_seen_timestamp_ = base::TimeTicks::Now(); @@ -211,7 +212,7 @@ void AutofillAgent::FrameWillClose(WebFrame* frame) { } } -void AutofillAgent::WillSubmitForm(WebFrame* frame, +void AutofillAgent::WillSubmitForm(WebLocalFrame* frame, const WebFormElement& form) { FormData form_data; if (WebFormElementToFormData(form, @@ -255,11 +256,11 @@ void AutofillAgent::OrientationChangeEvent(int orientation) { HidePopup(); } -void AutofillAgent::DidChangeScrollOffset(WebFrame*) { +void AutofillAgent::DidChangeScrollOffset(WebLocalFrame*) { HidePopup(); } -void AutofillAgent::didRequestAutocomplete(WebFrame* frame, +void AutofillAgent::didRequestAutocomplete(WebLocalFrame* frame, const WebFormElement& form) { // Disallow the dialog over non-https or broken https, except when the // ignore SSL flag is passed. See http://crbug.com/272512. diff --git a/components/autofill/content/renderer/autofill_agent.h b/components/autofill/content/renderer/autofill_agent.h index 9e29da6..218c4334 100644 --- a/components/autofill/content/renderer/autofill_agent.h +++ b/components/autofill/content/renderer/autofill_agent.h @@ -59,13 +59,13 @@ class AutofillAgent : public content::RenderViewObserver, private: // content::RenderViewObserver: virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - virtual void DidFinishDocumentLoad(blink::WebFrame* frame) OVERRIDE; + virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) OVERRIDE; virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; virtual void FrameWillClose(blink::WebFrame* frame) OVERRIDE; - virtual void WillSubmitForm(blink::WebFrame* frame, + virtual void WillSubmitForm(blink::WebLocalFrame* frame, const blink::WebFormElement& form) OVERRIDE; virtual void ZoomLevelChanged() OVERRIDE; - virtual void DidChangeScrollOffset(blink::WebFrame* frame) OVERRIDE; + virtual void DidChangeScrollOffset(blink::WebLocalFrame* frame) OVERRIDE; virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; virtual void OrientationChangeEvent(int orientation) OVERRIDE; @@ -85,7 +85,7 @@ class AutofillAgent : public content::RenderViewObserver, const blink::WebKeyboardEvent& event); // TODO(estade): remove this. virtual void didRequestAutocomplete( - blink::WebFrame* frame, + blink::WebLocalFrame* frame, const blink::WebFormElement& form); virtual void didRequestAutocomplete( const blink::WebFormElement& form, diff --git a/components/autofill/content/renderer/page_click_tracker.cc b/components/autofill/content/renderer/page_click_tracker.cc index 8938826..d4e02c4 100644 --- a/components/autofill/content/renderer/page_click_tracker.cc +++ b/components/autofill/content/renderer/page_click_tracker.cc @@ -111,7 +111,7 @@ void PageClickTracker::DidHandleMouseEvent(const WebMouseEvent& event) { listener_->FormControlElementClicked(textarea_element, was_focused_); } -void PageClickTracker::DidFinishDocumentLoad(blink::WebFrame* frame) { +void PageClickTracker::DidFinishDocumentLoad(blink::WebLocalFrame* frame) { tracked_frames_.push_back(frame); frame->document().addEventListener("mousedown", this, false); } diff --git a/components/autofill/content/renderer/page_click_tracker.h b/components/autofill/content/renderer/page_click_tracker.h index 24f45cd..fdbd602 100644 --- a/components/autofill/content/renderer/page_click_tracker.h +++ b/components/autofill/content/renderer/page_click_tracker.h @@ -39,7 +39,7 @@ class PageClickTracker : public content::RenderViewObserver, private: // RenderView::Observer implementation. - virtual void DidFinishDocumentLoad(blink::WebFrame* frame) OVERRIDE; + virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) OVERRIDE; virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; virtual void DidHandleMouseEvent(const blink::WebMouseEvent& event) OVERRIDE; diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc index 91fc888..5ba541b 100644 --- a/components/autofill/content/renderer/password_autofill_agent.cc +++ b/components/autofill/content/renderer/password_autofill_agent.cc @@ -455,14 +455,14 @@ void PasswordAutofillAgent::DidStartLoading() { } } -void PasswordAutofillAgent::DidFinishDocumentLoad(blink::WebFrame* frame) { +void PasswordAutofillAgent::DidFinishDocumentLoad(blink::WebLocalFrame* frame) { // The |frame| contents have been parsed, but not yet rendered. Let the // PasswordManager know that forms are loaded, even though we can't yet tell // whether they're visible. SendPasswordForms(frame, false); } -void PasswordAutofillAgent::DidFinishLoad(blink::WebFrame* frame) { +void PasswordAutofillAgent::DidFinishLoad(blink::WebLocalFrame* frame) { // The |frame| contents have been rendered. Let the PasswordManager know // which of the loaded frames are actually visible to the user. This also // triggers the "Save password?" infobar if the user just submitted a password @@ -479,7 +479,7 @@ void PasswordAutofillAgent::FrameWillClose(blink::WebFrame* frame) { } void PasswordAutofillAgent::WillSendSubmitEvent( - blink::WebFrame* frame, + blink::WebLocalFrame* frame, const blink::WebFormElement& form) { // Some login forms have onSubmit handlers that put a hash of the password // into a hidden field and then clear the password (http://crbug.com/28910). @@ -490,7 +490,7 @@ void PasswordAutofillAgent::WillSendSubmitEvent( provisionally_saved_forms_[frame].reset(password_form.release()); } -void PasswordAutofillAgent::WillSubmitForm(blink::WebFrame* frame, +void PasswordAutofillAgent::WillSubmitForm(blink::WebLocalFrame* frame, const blink::WebFormElement& form) { scoped_ptr<PasswordForm> submitted_form = CreatePasswordForm(form); @@ -542,7 +542,8 @@ blink::WebFrame* PasswordAutofillAgent::CurrentOrChildFrameWithSavedForms( return NULL; } -void PasswordAutofillAgent::DidStartProvisionalLoad(blink::WebFrame* frame) { +void PasswordAutofillAgent::DidStartProvisionalLoad( + blink::WebLocalFrame* frame) { if (!frame->parent()) { // If the navigation is not triggered by a user gesture, e.g. by some ajax // callback, then inherit the submitted password form from the previous diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h index 17ae483..f814dfd 100644 --- a/components/autofill/content/renderer/password_autofill_agent.h +++ b/components/autofill/content/renderer/password_autofill_agent.h @@ -110,15 +110,15 @@ class PasswordAutofillAgent : public content::RenderViewObserver { // RenderViewObserver: virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - virtual void DidStartProvisionalLoad(blink::WebFrame* frame) OVERRIDE; + virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) OVERRIDE; virtual void DidStartLoading() OVERRIDE; - virtual void DidFinishDocumentLoad(blink::WebFrame* frame) OVERRIDE; - virtual void DidFinishLoad(blink::WebFrame* frame) OVERRIDE; + virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) OVERRIDE; + virtual void DidFinishLoad(blink::WebLocalFrame* frame) OVERRIDE; virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; virtual void FrameWillClose(blink::WebFrame* frame) OVERRIDE; - virtual void WillSendSubmitEvent(blink::WebFrame* frame, + virtual void WillSendSubmitEvent(blink::WebLocalFrame* frame, const blink::WebFormElement& form) OVERRIDE; - virtual void WillSubmitForm(blink::WebFrame* frame, + virtual void WillSubmitForm(blink::WebLocalFrame* frame, const blink::WebFormElement& form) OVERRIDE; virtual void WillProcessUserGesture() OVERRIDE; diff --git a/components/autofill/content/renderer/password_generation_agent.cc b/components/autofill/content/renderer/password_generation_agent.cc index c81c154..85d45ed 100644 --- a/components/autofill/content/renderer/password_generation_agent.cc +++ b/components/autofill/content/renderer/password_generation_agent.cc @@ -107,7 +107,8 @@ PasswordGenerationAgent::PasswordGenerationAgent( } PasswordGenerationAgent::~PasswordGenerationAgent() {} -void PasswordGenerationAgent::DidFinishDocumentLoad(blink::WebFrame* frame) { +void PasswordGenerationAgent::DidFinishDocumentLoad( + blink::WebLocalFrame* frame) { // In every navigation, the IPC message sent by the password autofill manager // to query whether the current form is blacklisted or not happens when the // document load finishes, so we need to clear previous states here before we @@ -130,7 +131,7 @@ void PasswordGenerationAgent::DidFinishDocumentLoad(blink::WebFrame* frame) { } } -void PasswordGenerationAgent::DidFinishLoad(blink::WebFrame* frame) { +void PasswordGenerationAgent::DidFinishLoad(blink::WebLocalFrame* frame) { if (!enabled_) return; diff --git a/components/autofill/content/renderer/password_generation_agent.h b/components/autofill/content/renderer/password_generation_agent.h index 3179d6a..5f7e9fa 100644 --- a/components/autofill/content/renderer/password_generation_agent.h +++ b/components/autofill/content/renderer/password_generation_agent.h @@ -49,8 +49,8 @@ class PasswordGenerationAgent : public content::RenderViewObserver { private: // RenderViewObserver: - virtual void DidFinishDocumentLoad(blink::WebFrame* frame) OVERRIDE; - virtual void DidFinishLoad(blink::WebFrame* frame) OVERRIDE; + virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) OVERRIDE; + virtual void DidFinishLoad(blink::WebLocalFrame* frame) OVERRIDE; virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; // Message handlers. diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc index a9df13c..ce4b03e 100644 --- a/components/plugins/renderer/webview_plugin.cc +++ b/components/plugins/renderer/webview_plugin.cc @@ -28,6 +28,7 @@ using blink::WebDragOperationsMask; using blink::WebFrame; using blink::WebImage; using blink::WebInputEvent; +using blink::WebLocalFrame; using blink::WebMouseEvent; using blink::WebPlugin; using blink::WebPluginContainer; @@ -210,7 +211,7 @@ void WebViewPlugin::setToolTipText(const WebString& text, container_->element().setAttribute("title", text); } -void WebViewPlugin::startDragging(WebFrame*, +void WebViewPlugin::startDragging(WebLocalFrame*, const WebDragData&, WebDragOperationsMask, const WebImage&, @@ -228,12 +229,12 @@ void WebViewPlugin::didChangeCursor(const WebCursorInfo& cursor) { current_cursor_ = cursor; } -void WebViewPlugin::didClearWindowObject(WebFrame* frame, int world_id) { +void WebViewPlugin::didClearWindowObject(WebLocalFrame* frame, int world_id) { if (delegate_) delegate_->BindWebFrame(frame); } -void WebViewPlugin::didReceiveResponse(WebFrame* frame, +void WebViewPlugin::didReceiveResponse(WebLocalFrame* frame, unsigned identifier, const WebURLResponse& response) { WebFrameClient::didReceiveResponse(frame, identifier, response); diff --git a/components/plugins/renderer/webview_plugin.h b/components/plugins/renderer/webview_plugin.h index 4b87205..af352ec 100644 --- a/components/plugins/renderer/webview_plugin.h +++ b/components/plugins/renderer/webview_plugin.h @@ -110,7 +110,7 @@ class WebViewPlugin : public blink::WebPlugin, virtual void setToolTipText(const blink::WebString&, blink::WebTextDirection); - virtual void startDragging(blink::WebFrame* frame, + virtual void startDragging(blink::WebLocalFrame* frame, const blink::WebDragData& drag_data, blink::WebDragOperationsMask mask, const blink::WebImage& image, @@ -121,13 +121,13 @@ class WebViewPlugin : public blink::WebPlugin, virtual void didChangeCursor(const blink::WebCursorInfo& cursor); // WebFrameClient methods: - virtual void didClearWindowObject(blink::WebFrame* frame, int world_id); + virtual void didClearWindowObject(blink::WebLocalFrame* frame, int world_id); // This method is defined in WebPlugin as well as in WebFrameClient, but with // different parameters. We only care about implementing the WebPlugin // version, so we implement this method and call the default in WebFrameClient // (which does nothing) to correctly overload it. - virtual void didReceiveResponse(blink::WebFrame* frame, + virtual void didReceiveResponse(blink::WebLocalFrame* frame, unsigned identifier, const blink::WebURLResponse& response); |