| 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" |
| 9 #include "chrome/browser/autofill/autofill_external_delegate.h" |
| 10 |
| 11 class AutofillPopupViewViews; |
| 12 |
| 13 namespace content { |
| 14 class WebContents; |
| 15 } |
| 16 |
| 17 class AutofillExternalDelegateViews : public AutofillExternalDelegate { |
| 18 public: |
| 19 AutofillExternalDelegateViews(TabContents* tab_contents, |
| 20 AutofillManager* autofill_manager); |
| 21 |
| 22 virtual ~AutofillExternalDelegateViews(); |
| 23 |
| 24 protected: |
| 25 // AutofillExternalDelegate implementation. |
| 26 virtual void HideAutofillPopupInternal() OVERRIDE; |
| 27 virtual void OnQueryPlatformSpecific( |
| 28 int query_id, |
| 29 const webkit::forms::FormData& form, |
| 30 const webkit::forms::FormField& field, |
| 31 const gfx::Rect& bounds) OVERRIDE; |
| 32 virtual void ApplyAutofillSuggestions( |
| 33 const std::vector<string16>& autofill_values, |
| 34 const std::vector<string16>& autofill_labels, |
| 35 const std::vector<string16>& autofill_icons, |
| 36 const std::vector<int>& autofill_unique_ids) OVERRIDE; |
| 37 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 38 |
| 39 private: |
| 40 // Create a valid view to display the autofill results if one doesn't |
| 41 // currently exist. |
| 42 void CreateViewIfNeeded(); |
| 43 |
| 44 scoped_ptr<AutofillPopupViewViews> view_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegateViews); |
| 47 }; |
| 48 |
| 49 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_VIEWS_H_ |
| OLD | NEW |