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 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 } | 1710 } |
1711 | 1711 |
1712 void AutofillDialogViews::ContentsChanged(views::Textfield* sender, | 1712 void AutofillDialogViews::ContentsChanged(views::Textfield* sender, |
1713 const base::string16& new_contents) { | 1713 const base::string16& new_contents) { |
1714 TextfieldEditedOrActivated(sender, true); | 1714 TextfieldEditedOrActivated(sender, true); |
1715 } | 1715 } |
1716 | 1716 |
1717 bool AutofillDialogViews::HandleKeyEvent(views::Textfield* sender, | 1717 bool AutofillDialogViews::HandleKeyEvent(views::Textfield* sender, |
1718 const ui::KeyEvent& key_event) { | 1718 const ui::KeyEvent& key_event) { |
1719 ui::KeyEvent copy(key_event); | 1719 ui::KeyEvent copy(key_event); |
1720 #if defined(OS_WIN) && !defined(USE_AURA) | |
1721 content::NativeWebKeyboardEvent event(copy.native_event()); | |
1722 #else | |
1723 content::NativeWebKeyboardEvent event(©); | 1720 content::NativeWebKeyboardEvent event(©); |
1724 #endif | |
1725 return delegate_->HandleKeyPressEventInInput(event); | 1721 return delegate_->HandleKeyPressEventInInput(event); |
1726 } | 1722 } |
1727 | 1723 |
1728 bool AutofillDialogViews::HandleMouseEvent(views::Textfield* sender, | 1724 bool AutofillDialogViews::HandleMouseEvent(views::Textfield* sender, |
1729 const ui::MouseEvent& mouse_event) { | 1725 const ui::MouseEvent& mouse_event) { |
1730 if (mouse_event.IsLeftMouseButton() && sender->HasFocus()) { | 1726 if (mouse_event.IsLeftMouseButton() && sender->HasFocus()) { |
1731 TextfieldEditedOrActivated(sender, false); | 1727 TextfieldEditedOrActivated(sender, false); |
1732 // Show an error bubble if a user clicks on an input that's already focused | 1728 // Show an error bubble if a user clicks on an input that's already focused |
1733 // (and invalid). | 1729 // (and invalid). |
1734 ShowErrorBubbleForViewIfNecessary(sender); | 1730 ShowErrorBubbleForViewIfNecessary(sender); |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2467 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2463 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
2468 : section(section), | 2464 : section(section), |
2469 container(NULL), | 2465 container(NULL), |
2470 manual_input(NULL), | 2466 manual_input(NULL), |
2471 suggested_info(NULL), | 2467 suggested_info(NULL), |
2472 suggested_button(NULL) {} | 2468 suggested_button(NULL) {} |
2473 | 2469 |
2474 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2470 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
2475 | 2471 |
2476 } // namespace autofill | 2472 } // namespace autofill |
OLD | NEW |