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

Unified Diff: chrome/browser/ui/views/autofill/autofill_popup_base_view.h

Issue 870833002: [android] Autofill popup behavior fixes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update expectations of old test and add a new test. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/autofill/autofill_popup_base_view.h
diff --git a/chrome/browser/ui/views/autofill/autofill_popup_base_view.h b/chrome/browser/ui/views/autofill/autofill_popup_base_view.h
index 1b0c31f49c4d96cb48dc87d4d7d4e3efb59e8140..8d7865acc7b6e14a0da6e8a4d0f87f811cd704a5 100644
--- a/chrome/browser/ui/views/autofill/autofill_popup_base_view.h
+++ b/chrome/browser/ui/views/autofill/autofill_popup_base_view.h
@@ -9,7 +9,6 @@
#include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
#include "ui/views/focus/widget_focus_manager.h"
#include "ui/views/widget/widget_delegate.h"
-#include "ui/views/widget/widget_observer.h"
namespace content {
class WebContents;
@@ -19,13 +18,16 @@ namespace gfx {
class Point;
}
+namespace views {
+class FocusManager;
+}
+
namespace autofill {
// Class that deals with the event handling for Autofill-style popups. This
// class should only be instantiated by sub-classes.
class AutofillPopupBaseView : public views::WidgetDelegateView,
- public views::WidgetFocusChangeListener,
- public views::WidgetObserver {
+ public views::WidgetFocusChangeListener {
public:
static const SkColor kBorderColor;
static const SkColor kHoveredBackgroundColor;
@@ -36,7 +38,7 @@ class AutofillPopupBaseView : public views::WidgetDelegateView,
protected:
explicit AutofillPopupBaseView(AutofillPopupViewDelegate* delegate,
- views::Widget* observing_widget);
+ views::FocusManager* focus_manager);
~AutofillPopupBaseView() override;
// Show this popup. Idempotent.
@@ -65,11 +67,7 @@ class AutofillPopupBaseView : public views::WidgetDelegateView,
void OnNativeFocusChange(gfx::NativeView focused_before,
gfx::NativeView focused_now) override;
- // views::WidgetObserver implementation.
- void OnWidgetBoundsChanged(views::Widget* widget,
- const gfx::Rect& new_bounds) override;
-
- // Stop observing the |observing_widget_|.
+ // Stop observing accelerators and focus changes.
void RemoveObserver();
void SetSelection(const gfx::Point& point);
@@ -86,8 +84,8 @@ class AutofillPopupBaseView : public views::WidgetDelegateView,
// Controller for this popup. Weak reference.
AutofillPopupViewDelegate* delegate_;
- // The widget that |this| observes. Weak reference.
- views::Widget* observing_widget_;
+ // The focus manager that |this| observes. Weak reference.
+ views::FocusManager* focus_manager_;
base::WeakPtrFactory<AutofillPopupBaseView> weak_ptr_factory_;
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.cc ('k') | chrome/browser/ui/views/autofill/autofill_popup_base_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698