Chromium Code Reviews| 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 29 matching lines...) Expand all Loading... | |
| 40 gfx::NativeView container_view, | 40 gfx::NativeView container_view, |
| 41 const gfx::RectF& element_bounds); | 41 const gfx::RectF& element_bounds); |
| 42 | 42 |
| 43 // Shows the popup, or updates the existing popup with the given values. | 43 // Shows the popup, or updates the existing popup with the given values. |
| 44 void Show(const std::vector<string16>& names, | 44 void Show(const std::vector<string16>& names, |
| 45 const std::vector<string16>& subtexts, | 45 const std::vector<string16>& subtexts, |
| 46 const std::vector<string16>& icons, | 46 const std::vector<string16>& icons, |
| 47 const std::vector<int>& identifiers); | 47 const std::vector<int>& identifiers); |
| 48 | 48 |
| 49 // Hides the popup and destroys the controller. This also invalidates | 49 // Hides the popup and destroys the controller. This also invalidates |
| 50 // |delegate_|. Virtual for testing. | 50 // |delegate_|. |
| 51 virtual void Hide(); | 51 virtual void Hide() OVERRIDE; |
| 52 | 52 |
| 53 // KeyboardListener implementation. | 53 // KeyboardListener implementation. |
| 54 virtual bool HandleKeyPressEvent( | 54 virtual bool HandleKeyPressEvent( |
| 55 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 55 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
| 56 | 56 |
| 57 protected: | 57 protected: |
| 58 FRIEND_TEST_ALL_PREFIXES(AutofillExternalDelegateBrowserTest, | 58 FRIEND_TEST_ALL_PREFIXES(AutofillExternalDelegateBrowserTest, |
| 59 CloseWidgetAndNoLeaking); | 59 CloseWidgetAndNoLeaking); |
| 60 | 60 |
| 61 AutofillPopupControllerImpl(AutofillPopupDelegate* delegate, | 61 AutofillPopupControllerImpl(AutofillPopupDelegate* delegate, |
| 62 gfx::NativeView container_view, | 62 gfx::NativeView container_view, |
| 63 const gfx::RectF& element_bounds); | 63 const gfx::RectF& element_bounds); |
| 64 virtual ~AutofillPopupControllerImpl(); | 64 virtual ~AutofillPopupControllerImpl(); |
| 65 | 65 |
| 66 // AutofillPopupController implementation. | 66 // AutofillPopupController implementation. |
| 67 virtual void ViewDestroyed() OVERRIDE; | |
|
Ilya Sherman
2013/02/26 01:02:32
You'll need to update the Mac code not to call thi
csharp
2013/02/26 18:33:31
Done. (Just removed the call, not sure if the mac
| |
| 68 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; | 67 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; |
| 69 virtual void MouseHovered(int x, int y) OVERRIDE; | 68 virtual void MouseHovered(int x, int y) OVERRIDE; |
| 70 virtual void MouseClicked(int x, int y) OVERRIDE; | 69 virtual void MouseClicked(int x, int y) OVERRIDE; |
| 71 virtual void MouseExitedPopup() OVERRIDE; | 70 virtual void MouseExitedPopup() OVERRIDE; |
| 72 virtual void AcceptSuggestion(size_t index) OVERRIDE; | 71 virtual void AcceptSuggestion(size_t index) OVERRIDE; |
| 73 virtual int GetIconResourceID(const string16& resource_name) OVERRIDE; | 72 virtual int GetIconResourceID(const string16& resource_name) OVERRIDE; |
| 74 virtual bool CanDelete(size_t index) const OVERRIDE; | 73 virtual bool CanDelete(size_t index) const OVERRIDE; |
| 75 virtual gfx::Rect GetRowBounds(size_t index) OVERRIDE; | 74 virtual gfx::Rect GetRowBounds(size_t index) OVERRIDE; |
| 76 virtual void SetPopupBounds(const gfx::Rect& bounds) OVERRIDE; | 75 virtual void SetPopupBounds(const gfx::Rect& bounds) OVERRIDE; |
| 77 virtual const gfx::Rect& popup_bounds() const OVERRIDE; | 76 virtual const gfx::Rect& popup_bounds() const OVERRIDE; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 203 // Used to indicate if the delete icon within a row is currently selected. | 202 // Used to indicate if the delete icon within a row is currently selected. |
| 204 bool delete_icon_hovered_; | 203 bool delete_icon_hovered_; |
| 205 | 204 |
| 206 // True if |HideInternal| has already been called. | 205 // True if |HideInternal| has already been called. |
| 207 bool is_hiding_; | 206 bool is_hiding_; |
| 208 | 207 |
| 209 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_; | 208 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_; |
| 210 }; | 209 }; |
| 211 | 210 |
| 212 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ | 211 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ |
| OLD | NEW |