| 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 "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 virtual const std::vector<string16>& subtexts() const OVERRIDE; | 82 virtual const std::vector<string16>& subtexts() const OVERRIDE; |
| 83 virtual const std::vector<string16>& icons() const OVERRIDE; | 83 virtual const std::vector<string16>& icons() const OVERRIDE; |
| 84 virtual const std::vector<int>& identifiers() const OVERRIDE; | 84 virtual const std::vector<int>& identifiers() const OVERRIDE; |
| 85 #if !defined(OS_ANDROID) | 85 #if !defined(OS_ANDROID) |
| 86 virtual const gfx::Font& GetNameFontForRow(size_t index) const OVERRIDE; | 86 virtual const gfx::Font& GetNameFontForRow(size_t index) const OVERRIDE; |
| 87 virtual const gfx::Font& subtext_font() const OVERRIDE; | 87 virtual const gfx::Font& subtext_font() const OVERRIDE; |
| 88 #endif | 88 #endif |
| 89 virtual int selected_line() const OVERRIDE; | 89 virtual int selected_line() const OVERRIDE; |
| 90 virtual bool delete_icon_hovered() const OVERRIDE; | 90 virtual bool delete_icon_hovered() const OVERRIDE; |
| 91 | 91 |
| 92 // Like Hide(), but doesn't invalidate |delegate_| (the delegate will still | |
| 93 // be informed of destruction). | |
| 94 void HideInternal(); | |
| 95 | |
| 96 // Change which line is currently selected by the user. | 92 // Change which line is currently selected by the user. |
| 97 void SetSelectedLine(int selected_line); | 93 void SetSelectedLine(int selected_line); |
| 98 | 94 |
| 99 // Increase the selected line by 1, properly handling wrapping. | 95 // Increase the selected line by 1, properly handling wrapping. |
| 100 void SelectNextLine(); | 96 void SelectNextLine(); |
| 101 | 97 |
| 102 // Decrease the selected line by 1, properly handling wrapping. | 98 // Decrease the selected line by 1, properly handling wrapping. |
| 103 void SelectPreviousLine(); | 99 void SelectPreviousLine(); |
| 104 | 100 |
| 105 // The user has choosen the selected line. | 101 // The user has choosen the selected line. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // The line that is currently selected by the user. | 199 // The line that is currently selected by the user. |
| 204 // |kNoSelection| indicates that no line is currently selected. | 200 // |kNoSelection| indicates that no line is currently selected. |
| 205 int selected_line_; | 201 int selected_line_; |
| 206 | 202 |
| 207 // Used to indicate if the delete icon within a row is currently selected. | 203 // Used to indicate if the delete icon within a row is currently selected. |
| 208 bool delete_icon_hovered_; | 204 bool delete_icon_hovered_; |
| 209 | 205 |
| 210 // True if |HideInternal| has already been called. | 206 // True if |HideInternal| has already been called. |
| 211 bool is_hiding_; | 207 bool is_hiding_; |
| 212 | 208 |
| 213 // True if the delegate should be informed when |this| is destroyed. | |
| 214 bool inform_delegate_of_destruction_; | |
| 215 | |
| 216 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_; | 209 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_; |
| 217 }; | 210 }; |
| 218 | 211 |
| 219 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ | 212 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ |
| OLD | NEW |