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

Side by Side Diff: components/autofill/core/browser/autofill_driver.h

Issue 710453002: [Autofill] Componentize AutofillCCInfoBarDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses Peter's input over use of WeakPtr<>. Created 5 years, 12 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h"
10 #include "components/autofill/core/common/form_data.h" 11 #include "components/autofill/core/common/form_data.h"
12 #include "ui/base/window_open_disposition.h"
11 13
12 namespace base { 14 namespace base {
13 class SequencedWorkerPool; 15 class SequencedWorkerPool;
14 } 16 }
15 17
16 namespace net { 18 namespace net {
17 class URLRequestContextGetter; 19 class URLRequestContextGetter;
18 } 20 }
19 21
20 namespace autofill { 22 namespace autofill {
21 23
22 class FormStructure; 24 class FormStructure;
23 25
24 // Interface that allows Autofill core code to interact with its driver (i.e., 26 // Interface that allows Autofill core code to interact with its driver (i.e.,
25 // obtain information from it and give information to it). A concrete 27 // obtain information from it and give information to it). A concrete
26 // implementation must be provided by the driver. 28 // implementation must be provided by the driver.
27 class AutofillDriver { 29 class AutofillDriver : public base::SupportsWeakPtr<AutofillDriver> {
28 public: 30 public:
29 // The possible actions that the renderer can take on receiving form data. 31 // The possible actions that the renderer can take on receiving form data.
30 enum RendererFormDataAction { 32 enum RendererFormDataAction {
31 // The renderer should fill the form data. 33 // The renderer should fill the form data.
32 FORM_DATA_ACTION_FILL, 34 FORM_DATA_ACTION_FILL,
33 // The renderer should preview the form data. 35 // The renderer should preview the form data.
34 FORM_DATA_ACTION_PREVIEW 36 FORM_DATA_ACTION_PREVIEW
35 }; 37 };
36 38
37 virtual ~AutofillDriver() {} 39 virtual ~AutofillDriver() {}
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Tells the renderer to clear the currently previewed Autofill results. 84 // Tells the renderer to clear the currently previewed Autofill results.
83 virtual void RendererShouldClearPreviewedForm() = 0; 85 virtual void RendererShouldClearPreviewedForm() = 0;
84 86
85 // Tells the renderer to set the node text. 87 // Tells the renderer to set the node text.
86 virtual void RendererShouldFillFieldWithValue( 88 virtual void RendererShouldFillFieldWithValue(
87 const base::string16& value) = 0; 89 const base::string16& value) = 0;
88 90
89 // Tells the renderer to preview the node with suggested text. 91 // Tells the renderer to preview the node with suggested text.
90 virtual void RendererShouldPreviewFieldWithValue( 92 virtual void RendererShouldPreviewFieldWithValue(
91 const base::string16& value) = 0; 93 const base::string16& value) = 0;
94
95 // Opens |url| with the supplied |disposition|.
96 virtual void LinkClicked(const GURL& url,
97 WindowOpenDisposition disposition) = 0;
92 }; 98 };
93 99
94 } // namespace autofill 100 } // namespace autofill
95 101
96 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_ 102 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698