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 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 } | 990 } |
991 | 991 |
992 void AutofillDialogViews::SectionContainer::OnMouseReleased( | 992 void AutofillDialogViews::SectionContainer::OnMouseReleased( |
993 const ui::MouseEvent& event) { | 993 const ui::MouseEvent& event) { |
994 if (!ShouldForwardEvent(event)) | 994 if (!ShouldForwardEvent(event)) |
995 return; | 995 return; |
996 | 996 |
997 proxy_button_->OnMouseReleased(ProxyEvent(event)); | 997 proxy_button_->OnMouseReleased(ProxyEvent(event)); |
998 } | 998 } |
999 | 999 |
1000 views::View* AutofillDialogViews::SectionContainer::GetEventHandlerForPoint( | 1000 views::View* AutofillDialogViews::SectionContainer::GetEventHandlerForRect( |
1001 const gfx::Point& point) { | 1001 const gfx::Rect& rect) { |
1002 views::View* handler = views::View::GetEventHandlerForPoint(point); | 1002 // TODO(tdanderson): Modify this function to support rect-based event |
| 1003 // targeting. |
| 1004 |
| 1005 views::View* handler = views::View::GetEventHandlerForRect(rect); |
1003 // If the event is not in the label bar and there's no background to be | 1006 // If the event is not in the label bar and there's no background to be |
1004 // cleared, let normal event handling take place. | 1007 // cleared, let normal event handling take place. |
1005 if (!background() && | 1008 if (!background() && |
1006 point.y() > child_at(0)->bounds().bottom()) { | 1009 rect.CenterPoint().y() > child_at(0)->bounds().bottom()) { |
1007 return handler; | 1010 return handler; |
1008 } | 1011 } |
1009 | 1012 |
1010 // Special case for (CVC) inputs in the suggestion view. | 1013 // Special case for (CVC) inputs in the suggestion view. |
1011 if (forward_mouse_events_ && | 1014 if (forward_mouse_events_ && |
1012 handler->GetAncestorWithClassName(DecoratedTextfield::kViewClassName)) { | 1015 handler->GetAncestorWithClassName(DecoratedTextfield::kViewClassName)) { |
1013 return handler; | 1016 return handler; |
1014 } | 1017 } |
1015 | 1018 |
1016 // Special case for the proxy button itself. | 1019 // Special case for the proxy button itself. |
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2569 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2572 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
2570 : section(section), | 2573 : section(section), |
2571 container(NULL), | 2574 container(NULL), |
2572 manual_input(NULL), | 2575 manual_input(NULL), |
2573 suggested_info(NULL), | 2576 suggested_info(NULL), |
2574 suggested_button(NULL) {} | 2577 suggested_button(NULL) {} |
2575 | 2578 |
2576 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2579 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
2577 | 2580 |
2578 } // namespace autofill | 2581 } // namespace autofill |
OLD | NEW |