| 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_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
| 13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
| 14 #include "ui/gfx/font.h" |
| 14 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
| 15 | 16 |
| 16 namespace content { | 17 namespace content { |
| 17 class WebContents; | 18 class WebContents; |
| 18 } | 19 } |
| 19 | 20 |
| 20 class AutofillExternalDelegate; | 21 class AutofillExternalDelegate; |
| 21 | 22 |
| 22 class AutofillPopupView : public content::NotificationObserver { | 23 class AutofillPopupView : public content::NotificationObserver { |
| 23 public: | 24 public: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 const std::vector<string16>& autofill_labels() const { | 64 const std::vector<string16>& autofill_labels() const { |
| 64 return autofill_labels_; | 65 return autofill_labels_; |
| 65 } | 66 } |
| 66 const std::vector<string16>& autofill_icons() const { | 67 const std::vector<string16>& autofill_icons() const { |
| 67 return autofill_icons_; | 68 return autofill_icons_; |
| 68 } | 69 } |
| 69 const std::vector<int>& autofill_unique_ids() const { | 70 const std::vector<int>& autofill_unique_ids() const { |
| 70 return autofill_unique_ids_; | 71 return autofill_unique_ids_; |
| 71 } | 72 } |
| 72 | 73 |
| 74 const gfx::Font& label_font() const { return label_font_; } |
| 75 const gfx::Font& value_font() const { return value_font_; } |
| 76 |
| 73 int selected_line() const { return selected_line_; } | 77 int selected_line() const { return selected_line_; } |
| 74 | 78 |
| 75 // Change which line is currently selected by the user. | 79 // Change which line is currently selected by the user. |
| 76 void SetSelectedLine(int selected_line); | 80 void SetSelectedLine(int selected_line); |
| 77 | 81 |
| 78 // Clear the currently selected line so that nothing is selected. | 82 // Clear the currently selected line so that nothing is selected. |
| 79 void ClearSelectedLine(); | 83 void ClearSelectedLine(); |
| 80 | 84 |
| 81 // Increase the selected line by 1, properly handling wrapping. | 85 // Increase the selected line by 1, properly handling wrapping. |
| 82 void SelectNextLine(); | 86 void SelectNextLine(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 120 |
| 117 // The bounds of the text element that is the focus of the Autofill. | 121 // The bounds of the text element that is the focus of the Autofill. |
| 118 gfx::Rect element_bounds_; | 122 gfx::Rect element_bounds_; |
| 119 | 123 |
| 120 // The current Autofill query values. | 124 // The current Autofill query values. |
| 121 std::vector<string16> autofill_values_; | 125 std::vector<string16> autofill_values_; |
| 122 std::vector<string16> autofill_labels_; | 126 std::vector<string16> autofill_labels_; |
| 123 std::vector<string16> autofill_icons_; | 127 std::vector<string16> autofill_icons_; |
| 124 std::vector<int> autofill_unique_ids_; | 128 std::vector<int> autofill_unique_ids_; |
| 125 | 129 |
| 130 // The fonts for the popup text. |
| 131 gfx::Font value_font_; |
| 132 gfx::Font label_font_; |
| 133 |
| 126 // The line that is currently selected by the user. | 134 // The line that is currently selected by the user. |
| 127 // |kNoSelection| indicates that no line is currently selected. | 135 // |kNoSelection| indicates that no line is currently selected. |
| 128 int selected_line_; | 136 int selected_line_; |
| 129 }; | 137 }; |
| 130 | 138 |
| 131 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ | 139 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
| OLD | NEW |