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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc

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 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 #include "chrome/browser/ui/views/autofill/autofill_popup_view_views.h" 5 #include "chrome/browser/ui/views/autofill/autofill_popup_view_views.h"
6 6
7 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" 7 #include "chrome/browser/ui/autofill/autofill_popup_controller.h"
8 #include "components/autofill/core/browser/popup_item_ids.h" 8 #include "components/autofill/core/browser/popup_item_ids.h"
9 #include "components/autofill/core/browser/suggestion.h" 9 #include "components/autofill/core/browser/suggestion.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/events/keycodes/keyboard_codes.h" 11 #include "ui/events/keycodes/keyboard_codes.h"
12 #include "ui/gfx/canvas.h" 12 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/geometry/point.h" 13 #include "ui/gfx/geometry/point.h"
14 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/image/image.h" 15 #include "ui/gfx/image/image.h"
16 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 #include "ui/gfx/text_utils.h" 17 #include "ui/gfx/text_utils.h"
18 #include "ui/views/border.h" 18 #include "ui/views/border.h"
19 #include "ui/views/widget/widget.h" 19 #include "ui/views/widget/widget.h"
20 20
21 namespace autofill { 21 namespace autofill {
22 22
23 AutofillPopupViewViews::AutofillPopupViewViews( 23 AutofillPopupViewViews::AutofillPopupViewViews(
24 AutofillPopupController* controller, views::Widget* observing_widget) 24 AutofillPopupController* controller, views::FocusManager* focus_manager)
25 : AutofillPopupBaseView(controller, observing_widget), 25 : AutofillPopupBaseView(controller, focus_manager),
26 controller_(controller) {} 26 controller_(controller) {}
27 27
28 AutofillPopupViewViews::~AutofillPopupViewViews() {} 28 AutofillPopupViewViews::~AutofillPopupViewViews() {}
29 29
30 void AutofillPopupViewViews::Show() { 30 void AutofillPopupViewViews::Show() {
31 DoShow(); 31 DoShow();
32 } 32 }
33 33
34 void AutofillPopupViewViews::Hide() { 34 void AutofillPopupViewViews::Hide() {
35 // The controller is no longer valid after it hides us. 35 // The controller is no longer valid after it hides us.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 AutofillPopupController* controller) { 130 AutofillPopupController* controller) {
131 views::Widget* observing_widget = 131 views::Widget* observing_widget =
132 views::Widget::GetTopLevelWidgetForNativeView( 132 views::Widget::GetTopLevelWidgetForNativeView(
133 controller->container_view()); 133 controller->container_view());
134 134
135 // If the top level widget can't be found, cancel the popup since we can't 135 // If the top level widget can't be found, cancel the popup since we can't
136 // fully set it up. 136 // fully set it up.
137 if (!observing_widget) 137 if (!observing_widget)
138 return NULL; 138 return NULL;
139 139
140 return new AutofillPopupViewViews(controller, observing_widget); 140 return new AutofillPopupViewViews(controller,
141 observing_widget->GetFocusManager());
141 } 142 }
142 143
143 } // namespace autofill 144 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698