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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_popup_view_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_POPUP_VIEW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_
7
8 #include "chrome/browser/autofill/autofill_popup_view.h"
9 #include "content/public/browser/keyboard_listener.h"
10 #include "ui/views/widget/widget_delegate.h"
11
12 class AutofillExternalDelegateViews;
13
14 namespace content {
15 class RenderViewHost;
16 class WebContents;
17 }
18
19 namespace gfx {
20 class Rect;
21 }
22
23 // The View Autofill popup implementation.
24 class AutofillPopupViewViews : public views::WidgetDelegateView,
25 public AutofillPopupView,
26 public KeyboardListener {
27 public:
28 AutofillPopupViewViews(content::WebContents* web_contents,
29 AutofillExternalDelegateViews* external_delegate);
30 virtual ~AutofillPopupViewViews();
31
32 private:
33 class AutofillPopupWidget;
34
35 // views::WidgetDelegateView implementation.
36 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
37 virtual void WindowClosing() OVERRIDE;
38
39 // AutofillPopupView implementation.
40 virtual void ShowInternal() OVERRIDE;
41 virtual void HideInternal() OVERRIDE;
42 virtual void InvalidateRow(size_t row) OVERRIDE;
43 virtual void ResizePopup() OVERRIDE;
44
45 // The popup that contains this view. We create this, but it deletes itself
46 // when its window is destroyed. This is a WeakPtr because it's possible for
47 // the OS to destroy the window and thus delete this object before we're
48 // deleted, or without our knowledge.
49 base::WeakPtr<AutofillPopupWidget> popup_;
50
51 // Used to determine if our already closing, which would mean we don't
52 // need to close the widget.
53 bool popup_closing_;
54
55 AutofillExternalDelegateViews* external_delegate_; // Weak reference.
56 content::WebContents* web_contents_; // Weak reference.
57
58 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews);
59 };
60
61 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698