| 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" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 AutofillPopupView* view() { return view_; } | 131 AutofillPopupView* view() { return view_; } |
| 132 | 132 |
| 133 // |view_| pass throughs (virtual for testing). | 133 // |view_| pass throughs (virtual for testing). |
| 134 virtual void ShowView(); | 134 virtual void ShowView(); |
| 135 virtual void InvalidateRow(size_t row); | 135 virtual void InvalidateRow(size_t row); |
| 136 | 136 |
| 137 base::WeakPtr<AutofillPopupControllerImpl> GetWeakPtr(); | 137 base::WeakPtr<AutofillPopupControllerImpl> GetWeakPtr(); |
| 138 | 138 |
| 139 // Contains common popup functionality such as popup layout. Protected for | 139 // Contains common popup functionality such as popup layout. Protected for |
| 140 // testing. | 140 // testing. |
| 141 scoped_ptr<PopupControllerCommon> controller_common_; | 141 std::unique_ptr<PopupControllerCommon> controller_common_; |
| 142 | 142 |
| 143 private: | 143 private: |
| 144 #if !defined(OS_ANDROID) | 144 #if !defined(OS_ANDROID) |
| 145 FRIEND_TEST_ALL_PREFIXES(AutofillPopupControllerUnitTest, ElideText); | 145 FRIEND_TEST_ALL_PREFIXES(AutofillPopupControllerUnitTest, ElideText); |
| 146 | 146 |
| 147 // Helper method which elides the value and label for the suggestion at |row| | 147 // Helper method which elides the value and label for the suggestion at |row| |
| 148 // given the |available_width|. Puts the results in |elided_values_| and | 148 // given the |available_width|. Puts the results in |elided_values_| and |
| 149 // |elided_labels_|. | 149 // |elided_labels_|. |
| 150 void ElideValueAndLabelForRow(size_t row, int available_width); | 150 void ElideValueAndLabelForRow(size_t row, int available_width); |
| 151 #endif | 151 #endif |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // The line that is currently selected by the user. | 185 // The line that is currently selected by the user. |
| 186 // |kNoSelection| indicates that no line is currently selected. | 186 // |kNoSelection| indicates that no line is currently selected. |
| 187 int selected_line_; | 187 int selected_line_; |
| 188 | 188 |
| 189 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_; | 189 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace autofill | 192 } // namespace autofill |
| 193 | 193 |
| 194 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ | 194 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ |
| OLD | NEW |