Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_VIEWS_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_VIEWS_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
|
tfarina
2012/09/02 12:08:04
unused here.
csharp
2012/09/05 17:28:52
Done.
| |
| 9 #include "chrome/browser/autofill/autofill_external_delegate.h" | |
| 10 | |
| 11 class AutofillPopupViewViews; | |
| 12 | |
| 13 namespace content { | |
| 14 class WebContents; | |
|
tfarina
2012/09/02 12:08:04
unused here.
csharp
2012/09/05 17:28:52
Done.
| |
| 15 } | |
| 16 | |
| 17 // The View specific implementations of the AutofillExternalDelegate, | |
| 18 // handling the communication between the Autofill and Autocomplete | |
| 19 // selection and the popup that shows the values. | |
| 20 class AutofillExternalDelegateViews : public AutofillExternalDelegate { | |
| 21 public: | |
| 22 AutofillExternalDelegateViews(TabContents* tab_contents, | |
|
tfarina
2012/09/02 12:08:04
did you mean WebContents?
csharp
2012/09/05 17:28:52
Nope, tabcontents is needed by the base external d
| |
| 23 AutofillManager* autofill_manager); | |
| 24 | |
| 25 virtual ~AutofillExternalDelegateViews(); | |
| 26 | |
| 27 // Used by the popup view to indicate it has been destroyed. | |
| 28 void InvalidateView(); | |
| 29 | |
| 30 protected: | |
| 31 AutofillPopupViewViews* GetPopup() { return view_; } | |
|
tfarina
2012/09/02 12:08:04
and then rename this to popup_view()?
csharp
2012/09/05 17:28:52
Done.
| |
| 32 | |
| 33 // AutofillExternalDelegate implementation. | |
| 34 // Make protected to allow tests to override. | |
| 35 virtual void HideAutofillPopupInternal() OVERRIDE; | |
| 36 | |
| 37 private: | |
| 38 // AutofillExternalDelegate implementation. | |
| 39 virtual void OnQueryPlatformSpecific( | |
| 40 int query_id, | |
| 41 const webkit::forms::FormData& form, | |
| 42 const webkit::forms::FormField& field, | |
| 43 const gfx::Rect& bounds) OVERRIDE; | |
| 44 virtual void ApplyAutofillSuggestions( | |
| 45 const std::vector<string16>& autofill_values, | |
| 46 const std::vector<string16>& autofill_labels, | |
| 47 const std::vector<string16>& autofill_icons, | |
| 48 const std::vector<int>& autofill_unique_ids) OVERRIDE; | |
| 49 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | |
|
tfarina
2012/09/02 12:08:04
include compiler_specific.h for OVERRIDE.
csharp
2012/09/05 17:28:52
Done.
| |
| 50 | |
| 51 // Create a valid view to display the autofill results if one doesn't | |
| 52 // currently exist. | |
| 53 void CreateViewIfNeeded(); | |
| 54 | |
| 55 // We use a raw pointer here because even though we usually create the view, | |
| 56 // its widget handles deleting it. | |
| 57 AutofillPopupViewViews* view_; | |
|
tfarina
2012/09/02 12:08:04
|view_| is too generic. How about popup_view_?
csharp
2012/09/05 17:28:52
Done.
| |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegateViews); | |
|
tfarina
2012/09/02 12:08:04
include basictypes.h for this.
csharp
2012/09/05 17:28:52
Done.
| |
| 60 }; | |
| 61 | |
| 62 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_VIEWS_H_ | |
| OLD | NEW |