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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_external_delegate_views.h

Issue 10825324: Start of New Autofill UI for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
(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 // 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,
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 private:
31 // AutofillExternalDelegate implementation.
32 virtual void HideAutofillPopupInternal() OVERRIDE;
33 virtual void OnQueryPlatformSpecific(
34 int query_id,
35 const webkit::forms::FormData& form,
36 const webkit::forms::FormField& field,
37 const gfx::Rect& bounds) OVERRIDE;
38 virtual void ApplyAutofillSuggestions(
39 const std::vector<string16>& autofill_values,
40 const std::vector<string16>& autofill_labels,
41 const std::vector<string16>& autofill_icons,
42 const std::vector<int>& autofill_unique_ids) OVERRIDE;
43 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
44
45 // Create a valid view to display the autofill results if one doesn't
46 // currently exist.
47 void CreateViewIfNeeded();
48
49 // We use a raw pointer here because even though we usually create and delete
50 // the view, it is possible for it to get deleted by its parent view (if that
51 // happens we are informed via InvalidateView and we NULL out the pointer).
52 AutofillPopupViewViews* view_;
53
54 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegateViews);
55 };
56
57 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698