Chromium Code Reviews| Index: chrome/browser/ui/views/autofill/autofill_popup_view_views.h |
| diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_views.h b/chrome/browser/ui/views/autofill/autofill_popup_view_views.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..15c9ece523841a1de146e4635122d0c22c4e752e |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |
| + |
| +#include <vector> |
|
Ilya Sherman
2012/08/14 05:12:09
nit: This doesn't look like it's used within the h
csharp
2012/08/14 19:06:13
Done.
|
| + |
| +#include "chrome/browser/autofill/autofill_popup_view.h" |
| +#include "content/public/browser/keyboard_listener.h" |
| +#include "ui/views/view.h" |
| + |
| +namespace content { |
| +class RenderViewHost; |
| +class WebContents; |
| +} |
| + |
| +namespace gfx { |
| +class Rect; |
| +} |
| + |
| +class AutofillPopupViewViews : public views::View, |
| + public AutofillPopupView, |
| + public KeyboardListener { |
| + public: |
| + AutofillPopupViewViews(content::WebContents* web_contents, |
| + AutofillExternalDelegate* external_delegate); |
| + virtual ~AutofillPopupViewViews(); |
| + |
| + virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
|
Ilya Sherman
2012/08/14 05:12:09
nit: Does this need to be public? What is it over
csharp
2012/08/14 19:06:13
Moved to private. Overriding the views::View funct
|
| + |
| + protected: |
| + // AutofillPopupView implementations. |
|
Ilya Sherman
2012/08/14 05:12:09
nit: "implementations" -> "implementation"
csharp
2012/08/14 19:06:13
Done.
|
| + virtual void ShowInternal() OVERRIDE; |
| + virtual void HideInternal() OVERRIDE; |
| + virtual void InvalidateRow(size_t row) OVERRIDE; |
| + virtual void ResizePopup() OVERRIDE; |
|
Ilya Sherman
2012/08/14 05:12:09
nit: Do these need to be protected, or can they be
csharp
2012/08/14 19:06:13
I don't think so, moved.
|
| + |
| + private: |
| + class AutofillPopupWidget; |
| + |
| + // The popup that contains this view. We create this, but it deletes itself |
| + // when its window is destroyed. This is a WeakPtr because it's possible for |
| + // the OS to destroy the window and thus delete this object before we're |
| + // deleted, or without our knowledge. |
| + base::WeakPtr<AutofillPopupWidget> popup_; |
| + |
| + content::RenderViewHost* render_view_host_; // Weak reference. |
|
Ilya Sherman
2012/08/14 05:12:09
nit: Why cache this if you're already caching the
csharp
2012/08/14 19:06:13
Removed.
|
| + content::WebContents* web_contents_; // Weak reference. |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |