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

Side by Side Diff: components/autofill/ios/browser/autofill_driver_ios.h

Issue 964443002: Upstream iOS autofill driver implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add jdonnelly as OWNERS of //components/autofill/ios Created 5 years, 9 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
« no previous file with comments | « components/autofill/ios/OWNERS ('k') | components/autofill/ios/browser/autofill_driver_ios.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_IOS_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IOS_H_
7
8 #include <string>
9
10 #include "components/autofill/core/browser/autofill_client.h"
11 #include "components/autofill/core/browser/autofill_driver.h"
12 #include "components/autofill/core/browser/autofill_external_delegate.h"
13 #include "components/autofill/core/browser/autofill_manager.h"
14 #include "ios/web/public/web_state/web_state_user_data.h"
15
16 namespace web {
17 class WebState;
18 }
19
20 @protocol AutofillDriverIOSBridge;
21
22 namespace autofill {
23
24 class AutofillManagerDelegate;
25
26 // Class that drives autofill flow on iOS. There is one instance per
27 // WebContents.
28 class AutofillDriverIOS : public AutofillDriver,
29 public web::WebStateUserData<AutofillDriverIOS> {
30 public:
31 static void CreateForWebStateAndDelegate(
32 web::WebState* web_state,
33 AutofillClient* client,
34 id<AutofillDriverIOSBridge> bridge,
35 const std::string& app_locale,
36 AutofillManager::AutofillDownloadManagerState enable_download_manager);
37
38 // AutofillDriver:
39 bool IsOffTheRecord() const override;
40 net::URLRequestContextGetter* GetURLRequestContext() override;
41 bool RendererIsAvailable() override;
42 void SendFormDataToRenderer(int query_id,
43 RendererFormDataAction action,
44 const FormData& data) override;
45 void PingRenderer() override;
46 void DetectAccountCreationForms(
47 const std::vector<autofill::FormStructure*>& forms) override;
48 void SendAutofillTypePredictionsToRenderer(
49 const std::vector<FormStructure*>& forms) override;
50 void RendererShouldClearFilledForm() override;
51 void RendererShouldClearPreviewedForm() override;
52 void RendererShouldAcceptDataListSuggestion(
53 const base::string16& value) override;
54 base::SequencedWorkerPool* GetBlockingPool() override;
55
56 AutofillManager* autofill_manager() { return &autofill_manager_; }
57
58 void RendererShouldFillFieldWithValue(const base::string16& value) override;
59 void RendererShouldPreviewFieldWithValue(
60 const base::string16& value) override;
61 void PopupHidden() override;
62
63 private:
64 AutofillDriverIOS(
65 web::WebState* web_state,
66 AutofillClient* client,
67 id<AutofillDriverIOSBridge> bridge,
68 const std::string& app_locale,
69 AutofillManager::AutofillDownloadManagerState enable_download_manager);
70 ~AutofillDriverIOS() override;
71
72 // The WebState with which this object is associated.
73 web::WebState* web_state_;
74
75 // AutofillDriverIOSBridge instance that is passed in.
76 id<AutofillDriverIOSBridge> bridge_;
77
78 // AutofillManager instance via which this object drives the shared Autofill
79 // code.
80 AutofillManager autofill_manager_;
81 // AutofillExternalDelegate instance that is passed to the AutofillManager.
82 AutofillExternalDelegate autofill_external_delegate_;
83 };
84
85 } // namespace autofill
86
87 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IOS_H_
OLDNEW
« no previous file with comments | « components/autofill/ios/OWNERS ('k') | components/autofill/ios/browser/autofill_driver_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698