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_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" | 15 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" |
16 #include "chrome/browser/ui/autofill/autofill_popup_layout_model.h" | 16 #include "chrome/browser/ui/autofill/autofill_popup_layout_model.h" |
17 #include "chrome/browser/ui/autofill/popup_controller_common.h" | 17 #include "chrome/browser/ui/autofill/popup_controller_common.h" |
| 18 #include "ui/accessibility/ax_enums.h" |
18 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" |
19 #include "ui/gfx/geometry/rect_f.h" | 20 #include "ui/gfx/geometry/rect_f.h" |
20 #include "ui/native_theme/native_theme.h" | 21 #include "ui/native_theme/native_theme.h" |
21 | 22 |
22 namespace autofill { | 23 namespace autofill { |
23 | 24 |
24 class AutofillPopupDelegate; | 25 class AutofillPopupDelegate; |
25 class AutofillPopupView; | 26 class AutofillPopupView; |
26 | 27 |
27 // This class is a controller for an AutofillPopupView. It implements | 28 // This class is a controller for an AutofillPopupView. It implements |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 123 |
123 // Set the Autofill entry values. Exposed to allow tests to set these values | 124 // Set the Autofill entry values. Exposed to allow tests to set these values |
124 // without showing the popup. | 125 // without showing the popup. |
125 void SetValues(const std::vector<autofill::Suggestion>& suggestions); | 126 void SetValues(const std::vector<autofill::Suggestion>& suggestions); |
126 | 127 |
127 AutofillPopupView* view() { return view_; } | 128 AutofillPopupView* view() { return view_; } |
128 | 129 |
129 // |view_| pass throughs (virtual for testing). | 130 // |view_| pass throughs (virtual for testing). |
130 virtual void ShowView(); | 131 virtual void ShowView(); |
131 virtual void InvalidateRow(size_t row); | 132 virtual void InvalidateRow(size_t row); |
| 133 virtual void NotifyAccessibilityEventForRow(ui::AXEvent event_type, |
| 134 size_t row); |
132 | 135 |
133 base::WeakPtr<AutofillPopupControllerImpl> GetWeakPtr(); | 136 base::WeakPtr<AutofillPopupControllerImpl> GetWeakPtr(); |
134 | 137 |
135 // Contains common popup functionality such as popup layout. Protected for | 138 // Contains common popup functionality such as popup layout. Protected for |
136 // testing. | 139 // testing. |
137 std::unique_ptr<PopupControllerCommon> controller_common_; | 140 std::unique_ptr<PopupControllerCommon> controller_common_; |
138 | 141 |
139 private: | 142 private: |
140 #if !defined(OS_ANDROID) | 143 #if !defined(OS_ANDROID) |
141 FRIEND_TEST_ALL_PREFIXES(AutofillPopupControllerUnitTest, ElideText); | 144 FRIEND_TEST_ALL_PREFIXES(AutofillPopupControllerUnitTest, ElideText); |
(...skipping 26 matching lines...) Expand all Loading... |
168 // The line that is currently selected by the user. | 171 // The line that is currently selected by the user. |
169 // |kNoSelection| indicates that no line is currently selected. | 172 // |kNoSelection| indicates that no line is currently selected. |
170 int selected_line_; | 173 int selected_line_; |
171 | 174 |
172 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_; | 175 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_; |
173 }; | 176 }; |
174 | 177 |
175 } // namespace autofill | 178 } // namespace autofill |
176 | 179 |
177 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ | 180 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ |
OLD | NEW |