OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/autofill/autofill_dialog_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/base64.h" | 11 #include "base/base64.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/i18n/rtl.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
15 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
17 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
18 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
19 #include "base/time.h" | 20 #include "base/time.h" |
20 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 21 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
21 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/extensions/shell_window_registry.h" | 23 #include "chrome/browser/extensions/shell_window_registry.h" |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 // Form'? | 1453 // Form'? |
1453 std::vector<int> popup_ids; | 1454 std::vector<int> popup_ids; |
1454 for (size_t i = 0; i < popup_guids_.size(); ++i) { | 1455 for (size_t i = 0; i < popup_guids_.size(); ++i) { |
1455 popup_ids.push_back(i); | 1456 popup_ids.push_back(i); |
1456 } | 1457 } |
1457 | 1458 |
1458 popup_controller_ = AutofillPopupControllerImpl::GetOrCreate( | 1459 popup_controller_ = AutofillPopupControllerImpl::GetOrCreate( |
1459 popup_controller_, | 1460 popup_controller_, |
1460 weak_ptr_factory_.GetWeakPtr(), | 1461 weak_ptr_factory_.GetWeakPtr(), |
1461 parent_view, | 1462 parent_view, |
1462 content_bounds); | 1463 content_bounds, |
| 1464 base::i18n::IsRTL() ? |
| 1465 base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT); |
1463 popup_controller_->Show(popup_values, | 1466 popup_controller_->Show(popup_values, |
1464 popup_labels, | 1467 popup_labels, |
1465 popup_icons, | 1468 popup_icons, |
1466 popup_ids); | 1469 popup_ids); |
1467 input_showing_popup_ = input; | 1470 input_showing_popup_ = input; |
1468 } | 1471 } |
1469 | 1472 |
1470 void AutofillDialogControllerImpl::FocusMoved() { | 1473 void AutofillDialogControllerImpl::FocusMoved() { |
1471 HidePopup(); | 1474 HidePopup(); |
1472 } | 1475 } |
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3041 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; | 3044 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; |
3042 } | 3045 } |
3043 | 3046 |
3044 // Has Wallet items. | 3047 // Has Wallet items. |
3045 return has_autofill_profiles ? | 3048 return has_autofill_profiles ? |
3046 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : | 3049 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : |
3047 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; | 3050 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; |
3048 } | 3051 } |
3049 | 3052 |
3050 } // namespace autofill | 3053 } // namespace autofill |
OLD | NEW |