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/string_util.h" | 16 #include "base/string_util.h" |
16 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_split.h" | 18 #include "base/strings/string_split.h" |
18 #include "base/time.h" | 19 #include "base/time.h" |
19 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.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 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 // Form'? | 1376 // Form'? |
1376 std::vector<int> popup_ids; | 1377 std::vector<int> popup_ids; |
1377 for (size_t i = 0; i < popup_guids_.size(); ++i) { | 1378 for (size_t i = 0; i < popup_guids_.size(); ++i) { |
1378 popup_ids.push_back(i); | 1379 popup_ids.push_back(i); |
1379 } | 1380 } |
1380 | 1381 |
1381 popup_controller_ = AutofillPopupControllerImpl::GetOrCreate( | 1382 popup_controller_ = AutofillPopupControllerImpl::GetOrCreate( |
1382 popup_controller_, | 1383 popup_controller_, |
1383 weak_ptr_factory_.GetWeakPtr(), | 1384 weak_ptr_factory_.GetWeakPtr(), |
1384 parent_view, | 1385 parent_view, |
1385 content_bounds); | 1386 content_bounds, |
| 1387 base::i18n::IsRTL() ? |
| 1388 base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT); |
1386 popup_controller_->Show(popup_values, | 1389 popup_controller_->Show(popup_values, |
1387 popup_labels, | 1390 popup_labels, |
1388 popup_icons, | 1391 popup_icons, |
1389 popup_ids); | 1392 popup_ids); |
1390 input_showing_popup_ = input; | 1393 input_showing_popup_ = input; |
1391 } | 1394 } |
1392 | 1395 |
1393 void AutofillDialogControllerImpl::FocusMoved() { | 1396 void AutofillDialogControllerImpl::FocusMoved() { |
1394 HidePopup(); | 1397 HidePopup(); |
1395 } | 1398 } |
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2955 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; | 2958 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; |
2956 } | 2959 } |
2957 | 2960 |
2958 // Has Wallet items. | 2961 // Has Wallet items. |
2959 return has_autofill_profiles ? | 2962 return has_autofill_profiles ? |
2960 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : | 2963 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : |
2961 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; | 2964 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; |
2962 } | 2965 } |
2963 | 2966 |
2964 } // namespace autofill | 2967 } // namespace autofill |
OLD | NEW |