Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: components/autofill/browser/autofill_manager.h

Issue 16286020: Abstract WebContentsObserver from Autofill shared code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Nits Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/browser/autofill_manager.h
diff --git a/components/autofill/browser/autofill_manager.h b/components/autofill/browser/autofill_manager.h
index 9233659024069dc5f392bf3d0957a0ea438acc4a..70c978ff9b68426fdf96863f5b679e67063c1557 100644
--- a/components/autofill/browser/autofill_manager.h
+++ b/components/autofill/browser/autofill_manager.h
@@ -30,17 +30,16 @@
#include "components/autofill/common/autocheckout_status.h"
#include "components/autofill/common/form_data.h"
#include "components/autofill/common/forms_seen_state.h"
-#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/ssl_status.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h"
class GURL;
-struct ViewHostMsg_FrameNavigate_Params;
-
namespace content {
class RenderViewHost;
class WebContents;
+struct FrameNavigateParams;
+struct LoadCommittedDetails;
}
namespace gfx {
@@ -75,8 +74,7 @@ struct PasswordFormFillData;
// Manages saving and restoring the user's personal information entered into web
// forms.
-class AutofillManager : public content::WebContentsObserver,
- public AutofillDownloadManager::Observer,
+class AutofillManager : public AutofillDownloadManager::Observer,
public base::SupportsUserData::Data {
public:
enum AutofillDownloadManagerState {
@@ -144,6 +142,13 @@ class AutofillManager : public content::WebContentsObserver,
// Only for testing.
void SetTestDelegate(autofill::AutofillManagerTestDelegate* delegate);
+ // TODO(blundell): Move the logic in these methods into AutofillDriver and
+ // eliminate these methods.
+ virtual void DidNavigateMainFrame(
+ const content::LoadCommittedDetails& details,
+ const content::FrameNavigateParams& params);
+ virtual bool OnMessageReceived(const IPC::Message& message);
+
protected:
// Only test code should subclass AutofillManager.
AutofillManager(content::WebContents* web_contents,
@@ -214,11 +219,6 @@ class AutofillManager : public content::WebContentsObserver,
const FormData& form_data);
private:
- // content::WebContentsObserver:
- virtual void DidNavigateMainFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) OVERRIDE;
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// AutofillDownloadManager::Observer:
virtual void OnLoadedServerPredictions(
@@ -344,6 +344,8 @@ class AutofillManager : public content::WebContentsObserver,
void SendAutofillTypePredictions(
const std::vector<FormStructure*>& forms) const;
+ content::WebContents* web_contents_;
+
autofill::AutofillManagerDelegate* const manager_delegate_;
std::string app_locale_;

Powered by Google App Engine
This is Rietveld 408576698