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

Side by Side Diff: components/autofill/content/browser/autofill_driver_impl.h

Issue 16286020: Abstract WebContentsObserver from Autofill shared code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Nit 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_
7
8 #include <string>
9
10 #include "base/supports_user_data.h"
11 #include "components/autofill/browser/autofill_driver.h"
12 #include "components/autofill/browser/autofill_manager.h"
13 #include "content/public/browser/web_contents_observer.h"
14
15 namespace content {
16 class WebContents;
17 }
18
19 namespace IPC {
20 class Message;
21 }
22
23 namespace autofill {
24
25 class AutofillContext;
26 class AutofillExternalDelegate;
27 class AutofillManager;
28 class AutofillManagerDelegate;
29
30 // Class that drives autofill flow in the browser process based on
31 // communication from the renderer and from the external world. There is one
32 // instance per WebContents.
33 class AutofillDriverImpl : public AutofillDriver,
34 public content::WebContentsObserver,
35 public base::SupportsUserData::Data {
36 public:
37 static void CreateForWebContentsAndDelegate(
38 content::WebContents* contents,
39 autofill::AutofillManagerDelegate* delegate,
40 const std::string& app_locale,
41 AutofillManager::AutofillDownloadManagerState enable_download_manager,
42 bool enable_native_UI);
Ilya Sherman 2013/06/12 00:07:46 nit: Please name this variable using hacker_case,
blundell 2013/06/12 16:29:37 Done.
43 static AutofillDriverImpl* FromWebContents(content::WebContents* contents);
44
45 // AutofillDriver:
46 virtual content::WebContents* GetWebContents() OVERRIDE;
47
48 private:
49 AutofillDriverImpl(
50 content::WebContents* web_contents,
51 autofill::AutofillManagerDelegate* delegate,
52 const std::string& app_locale,
53 AutofillManager::AutofillDownloadManagerState enable_download_manager,
54 bool enable_native_UI);
55 virtual ~AutofillDriverImpl();
56
57 // content::WebContentsObserver:
58 virtual void DidNavigateMainFrame(
59 const content::LoadCommittedDetails& details,
60 const content::FrameNavigateParams& params) OVERRIDE;
61 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
62
63 AutofillManager* autofill_manager_;
64 AutofillExternalDelegate* autofill_external_delegate_;
Ilya Sherman 2013/06/12 00:07:46 Please document these, including comments about th
blundell 2013/06/12 16:29:37 Done. Removed the autofill_external_delegate_ inst
65 };
66
67 } // namespace autofill
68
69 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698