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

Side by Side Diff: components/autofill/content/browser/autofill_driver.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 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_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_H_
7
8 #include <string>
9
10 #include "base/supports_user_data.h"
11 #include "components/autofill/browser/autofill_manager.h"
12 #include "content/public/browser/web_contents_observer.h"
13
14 namespace content {
15 class WebContents;
16 }
17
18 namespace IPC {
19 class Message;
20 }
21
22 namespace autofill {
23
24 class AutofillExternalDelegate;
25 class AutofillManager;
26 class AutofillManagerDelegate;
27
28 // Class that drives autofill flow in the browser process based on
29 // communication from the renderer and from the external world. There is one
30 // instance per WebContents.
31 class AutofillDriver : public content::WebContentsObserver,
32 public base::SupportsUserData::Data {
33 public:
34 static void CreateForWebContentsAndDelegate(
35 content::WebContents* contents,
36 autofill::AutofillManagerDelegate* delegate,
37 const std::string& app_locale,
38 AutofillManager::AutofillDownloadManagerState enable_download_manager,
39 bool enable_native_UI);
40 static AutofillDriver* FromWebContents(content::WebContents* contents);
41
42 private:
43 AutofillDriver(
44 content::WebContents* web_contents,
45 autofill::AutofillManagerDelegate* delegate,
46 const std::string& app_locale,
47 AutofillManager::AutofillDownloadManagerState enable_download_manager,
48 bool enable_native_UI);
49 virtual ~AutofillDriver();
50
51 // content::WebContentsObserver:
52 virtual void DidNavigateMainFrame(
53 const content::LoadCommittedDetails& details,
54 const content::FrameNavigateParams& params) OVERRIDE;
55 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
56
57 AutofillManager* autofill_manager_;
58 AutofillExternalDelegate* autofill_external_delegate_;
59 };
60
61 } // namespace autofill
62
63 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698