| 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_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.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_view_delegate.h" | 15 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" |
| 16 #include "third_party/skia/include/core/SkColor.h" |
| 16 | 17 |
| 17 namespace gfx { | 18 namespace gfx { |
| 18 class FontList; | 19 class FontList; |
| 19 class Point; | 20 class Point; |
| 20 class Rect; | 21 class Rect; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace autofill { | 24 namespace autofill { |
| 24 | 25 |
| 25 class AutofillPopupLayoutModel; | 26 class AutofillPopupLayoutModel; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 55 // Removes the suggestion at the given index. | 56 // Removes the suggestion at the given index. |
| 56 virtual bool RemoveSuggestion(int index) = 0; | 57 virtual bool RemoveSuggestion(int index) = 0; |
| 57 | 58 |
| 58 #if !defined(OS_ANDROID) | 59 #if !defined(OS_ANDROID) |
| 59 // The same font can vary based on the type of data it is showing, | 60 // The same font can vary based on the type of data it is showing, |
| 60 // so we need to know the row. | 61 // so we need to know the row. |
| 61 virtual const gfx::FontList& GetValueFontListForRow(size_t index) const = 0; | 62 virtual const gfx::FontList& GetValueFontListForRow(size_t index) const = 0; |
| 62 virtual const gfx::FontList& GetLabelFontList() const = 0; | 63 virtual const gfx::FontList& GetLabelFontList() const = 0; |
| 63 #endif | 64 #endif |
| 64 | 65 |
| 66 // Returns the background color of the row item according to its |index|, or |
| 67 // transparent if the default popup background should be used. |
| 68 virtual SkColor GetBackgroundColorForRow(int index) const = 0; |
| 69 |
| 65 // Returns the index of the selected line. A line is "selected" when it is | 70 // Returns the index of the selected line. A line is "selected" when it is |
| 66 // hovered or has keyboard focus. | 71 // hovered or has keyboard focus. |
| 67 virtual int selected_line() const = 0; | 72 virtual int selected_line() const = 0; |
| 68 | 73 |
| 69 virtual const AutofillPopupLayoutModel& layout_model() const = 0; | 74 virtual const AutofillPopupLayoutModel& layout_model() const = 0; |
| 70 | 75 |
| 71 protected: | 76 protected: |
| 72 ~AutofillPopupController() override {} | 77 ~AutofillPopupController() override {} |
| 73 }; | 78 }; |
| 74 | 79 |
| 75 } // namespace autofill | 80 } // namespace autofill |
| 76 | 81 |
| 77 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ | 82 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ |
| OLD | NEW |