| Index: chrome/renderer/password_autocomplete_manager.h
|
| ===================================================================
|
| --- chrome/renderer/password_autocomplete_manager.h (revision 71253)
|
| +++ chrome/renderer/password_autocomplete_manager.h (working copy)
|
| @@ -11,28 +11,19 @@
|
|
|
| #include "base/task.h"
|
| #include "chrome/renderer/page_click_listener.h"
|
| +#include "chrome/renderer/render_view.h"
|
| #include "webkit/glue/password_form_dom_manager.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h"
|
|
|
| -class RenderView;
|
| -namespace WebKit {
|
| -class WebKeyboardEvent;
|
| -class WebView;
|
| -}
|
|
|
| // This class is responsible for filling password forms.
|
| // There is one PasswordAutocompleteManager per RenderView.
|
| -class PasswordAutocompleteManager : public PageClickListener {
|
| +class PasswordAutocompleteManager : public RenderView::Observer,
|
| + public PageClickListener {
|
| public:
|
| - explicit PasswordAutocompleteManager(RenderView* render_view);
|
| + PasswordAutocompleteManager();
|
| virtual ~PasswordAutocompleteManager();
|
|
|
| - // Invoked by the renderer when it receives the password info from the
|
| - // browser. This triggers a password autocomplete (if wait_for_username is
|
| - // false on |form_data|).
|
| - void ReceivedPasswordFormFillData(WebKit::WebView* view,
|
| - const webkit_glue::PasswordFormFillData& form_data);
|
| -
|
| // Invoked when the passed frame is closing. Gives us a chance to clear any
|
| // reference we may have to elements in that frame.
|
| void FrameClosing(const WebKit::WebFrame* frame);
|
| @@ -50,10 +41,6 @@
|
| const WebKit::WebInputElement& password,
|
| const webkit_glue::PasswordFormFillData& fill_data);
|
|
|
| - // Scans the given frame for password forms and sends them up to the browser.
|
| - // If |only_visible| is true, only forms visible in the layout are sent.
|
| - void SendPasswordForms(WebKit::WebFrame* frame, bool only_visible);
|
| -
|
| // WebViewClient editor related calls forwarded by the RenderView.
|
| // If they return true, it indicates the event was consumed and should not
|
| // be used for any other autofill activity.
|
| @@ -71,11 +58,23 @@
|
| };
|
| typedef std::map<WebKit::WebElement, PasswordInfo> LoginToPasswordInfoMap;
|
|
|
| + // RenderView::Observer implementation.
|
| + virtual bool OnMessageReceived(const IPC::Message& message);
|
| + virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame);
|
| + virtual void DidFinishLoad(WebKit::WebFrame* frame);
|
| +
|
| // PageClickListener implementation:
|
| virtual bool InputElementClicked(const WebKit::WebInputElement& element,
|
| bool was_focused,
|
| bool is_focused);
|
|
|
| + void OnFillPasswordForm(
|
| + const webkit_glue::PasswordFormFillData& form_data);
|
| +
|
| + // Scans the given frame for password forms and sends them up to the browser.
|
| + // If |only_visible| is true, only forms visible in the layout are sent.
|
| + void SendPasswordForms(WebKit::WebFrame* frame, bool only_visible);
|
| +
|
| void GetSuggestions(
|
| const webkit_glue::PasswordFormFillData& fill_data,
|
| const string16& input,
|
| @@ -91,13 +90,6 @@
|
| const webkit_glue::PasswordFormFillData& fill_data,
|
| bool exact_username_match);
|
|
|
| - // Convenience method that returns the routing ID of the render view we are
|
| - // associated with.
|
| - int GetRoutingID() const;
|
| -
|
| - // Weak reference.
|
| - RenderView* render_view_;
|
| -
|
| // The logins we have filled so far with their associated info.
|
| LoginToPasswordInfoMap login_to_password_info_;
|
|
|
|
|