OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "chrome/browser/ui/autofill/autofill_popup_view.h" | 11 #include "chrome/browser/ui/autofill/autofill_popup_view.h" |
12 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" | 12 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" |
13 | 13 |
14 namespace autofill { | 14 namespace autofill { |
15 | 15 |
16 class AutofillPopupController; | 16 class AutofillPopupController; |
17 | 17 |
18 // Views toolkit implementation for AutofillPopupView. | 18 // Views toolkit implementation for AutofillPopupView. |
19 class AutofillPopupViewViews : public AutofillPopupBaseView, | 19 class AutofillPopupViewViews : public AutofillPopupBaseView, |
20 public AutofillPopupView { | 20 public AutofillPopupView { |
21 public: | 21 public: |
22 // |controller| should not be null. | |
22 AutofillPopupViewViews(AutofillPopupController* controller, | 23 AutofillPopupViewViews(AutofillPopupController* controller, |
23 views::Widget* parent_widget); | 24 views::Widget* parent_widget); |
25 ~AutofillPopupViewViews() override; | |
24 | 26 |
25 private: | 27 private: |
26 ~AutofillPopupViewViews() override; | 28 FRIEND_TEST_ALL_PREFIXES(AutofillPopupViewViewsTest, |
27 | 29 NotifyAccessibilityEventForRow); |
28 // AutofillPopupView implementation. | 30 // AutofillPopupView implementation. |
29 void Show() override; | 31 void Show() override; |
30 void Hide() override; | 32 void Hide() override; |
31 void InvalidateRow(size_t row) override; | 33 void InvalidateRow(size_t row) override; |
32 void UpdateBoundsAndRedrawPopup() override; | 34 void UpdateBoundsAndRedrawPopup() override; |
Evan Stade
2017/03/06 21:45:33
probably better to change this to a more generic n
csashi
2017/03/07 01:53:53
Done.
| |
35 void NotifyAccessibilityEventForRow(ui::AXEvent event_type, | |
36 size_t row) override; | |
33 | 37 |
34 // views::Views implementation | 38 // views::Views implementation |
35 void OnPaint(gfx::Canvas* canvas) override; | 39 void OnPaint(gfx::Canvas* canvas) override; |
40 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; | |
36 | 41 |
37 // Draw the given autofill entry in |entry_rect|. | 42 // Draw the given autofill entry in |entry_rect|. |
38 void DrawAutofillEntry(gfx::Canvas* canvas, | 43 void DrawAutofillEntry(gfx::Canvas* canvas, |
39 int index, | 44 int index, |
40 const gfx::Rect& entry_rect); | 45 const gfx::Rect& entry_rect); |
46 // Creates one child view for every suggestion. | |
Evan Stade
2017/03/06 21:45:33
nit: newline before this line. Also a more informa
csashi
2017/03/07 01:53:53
Done.
| |
47 void CreateChildViews(); | |
41 | 48 |
42 AutofillPopupController* controller_; // Weak reference. | 49 AutofillPopupController* controller_; // Weak reference. |
43 | 50 |
44 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews); | 51 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews); |
45 }; | 52 }; |
46 | 53 |
47 } // namespace autofill | 54 } // namespace autofill |
48 | 55 |
49 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ | 56 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |
OLD | NEW |