Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_controller_impl.h

Issue 12556002: Always Close the Autofill UI through the same path (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Disable Test On Linux Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // The fonts for the popup text. 187 // The fonts for the popup text.
189 gfx::Font name_font_; 188 gfx::Font name_font_;
190 gfx::Font subtext_font_; 189 gfx::Font subtext_font_;
191 gfx::Font warning_font_; 190 gfx::Font warning_font_;
192 #endif 191 #endif
193 192
194 // The line that is currently selected by the user. 193 // The line that is currently selected by the user.
195 // |kNoSelection| indicates that no line is currently selected. 194 // |kNoSelection| indicates that no line is currently selected.
196 int selected_line_; 195 int selected_line_;
197 196
198 // True if |HideInternal| has already been called.
199 bool is_hiding_;
200
201 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_; 197 base::WeakPtrFactory<AutofillPopupControllerImpl> weak_ptr_factory_;
202 }; 198 };
203 199
204 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ 200 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698