OLD | NEW |
---|---|
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 "components/autofill/core/common/form_data.h" | |
9 | |
8 namespace content { | 10 namespace content { |
9 class WebContents; | 11 class WebContents; |
10 } | 12 } |
11 | 13 |
12 namespace autofill { | 14 namespace autofill { |
13 | 15 |
14 // Interface that provides access to the driver-level context in which Autofill | 16 // Interface that allows Autofill core code to interact with its driver (i.e., |
15 // is operating. A concrete implementation must be provided by the driver. | 17 // obtain information from it and give information to it). A concrete |
18 // implementation must be provided by the driver. | |
16 class AutofillDriver { | 19 class AutofillDriver { |
17 public: | 20 public: |
18 virtual ~AutofillDriver() {} | 21 virtual ~AutofillDriver() {} |
19 | 22 |
20 // TODO(blundell): Remove this method once shared code no longer needs to | 23 // TODO(blundell): Remove this method once shared code no longer needs to |
21 // know about WebContents. | 24 // know about WebContents. |
22 virtual content::WebContents* GetWebContents() = 0; | 25 virtual content::WebContents* GetWebContents() = 0; |
26 | |
27 // Returns true iff the renderer is available for communication. | |
28 virtual bool CanSendToRenderer() = 0; | |
Ilya Sherman
2013/06/25 01:22:33
Would it make more sense for SendFormDataToRendere
blundell
2013/06/25 16:11:04
I noticed a couple places where there's a short-ci
| |
29 | |
30 // Forwards |data| to the renderer. |query_id| is the id of the renderer's | |
31 // original request for the data. | |
32 virtual void SendFormDataToRenderer(int query_id, FormData data) = 0; | |
23 }; | 33 }; |
24 | 34 |
25 } // namespace autofill | 35 } // namespace autofill |
26 | 36 |
27 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_ | 37 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_ |
OLD | NEW |