[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / autofill / autofill_popup_view_views.h
blobb9768f1ae16f1b26feb1ad4d58b31b77b9588eed
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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_
8 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
9 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h"
11 class AutofillPopupController;
13 namespace autofill {
15 // Views toolkit implementation for AutofillPopupView.
16 class AutofillPopupViewViews : public AutofillPopupBaseView,
17 public AutofillPopupView {
18 public:
19 // The observing widget should be the top level widget for the native
20 // view, which we need to listen to for several signals that indicate the
21 // popup should be closed.
22 AutofillPopupViewViews(AutofillPopupController* controller,
23 views::Widget* observing_widget);
25 private:
26 virtual ~AutofillPopupViewViews();
28 // AutofillPopupView implementation.
29 virtual void Show() OVERRIDE;
30 virtual void Hide() OVERRIDE;
31 virtual void InvalidateRow(size_t row) OVERRIDE;
32 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE;
34 // views::Views implementation
35 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
37 // Draw the given autofill entry in |entry_rect|.
38 void DrawAutofillEntry(gfx::Canvas* canvas,
39 int index,
40 const gfx::Rect& entry_rect);
42 AutofillPopupController* controller_; // Weak reference.
44 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews);
47 } // namespace autofill
49 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_