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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1362 // Form'? | 1363 // Form'? |
1363 std::vector<int> popup_ids; | 1364 std::vector<int> popup_ids; |
1364 for (size_t i = 0; i < popup_guids_.size(); ++i) { | 1365 for (size_t i = 0; i < popup_guids_.size(); ++i) { |
1365 popup_ids.push_back(i); | 1366 popup_ids.push_back(i); |
1366 } | 1367 } |
1367 | 1368 |
1368 popup_controller_ = AutofillPopupControllerImpl::GetOrCreate( | 1369 popup_controller_ = AutofillPopupControllerImpl::GetOrCreate( |
1369 popup_controller_, | 1370 popup_controller_, |
1370 weak_ptr_factory_.GetWeakPtr(), | 1371 weak_ptr_factory_.GetWeakPtr(), |
1371 parent_view, | 1372 parent_view, |
1372 content_bounds); | 1373 content_bounds, |
1374 base::i18n::IsRTL() ? | |
1375 base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT); | |
Ilya Sherman
2013/06/06 21:20:47
nit: Indent this line two more spaces.
csharp
2013/06/07 15:22:06
Done.
| |
1373 popup_controller_->Show(popup_values, | 1376 popup_controller_->Show(popup_values, |
1374 popup_labels, | 1377 popup_labels, |
1375 popup_icons, | 1378 popup_icons, |
1376 popup_ids); | 1379 popup_ids); |
1377 input_showing_popup_ = input; | 1380 input_showing_popup_ = input; |
1378 } | 1381 } |
1379 | 1382 |
1380 void AutofillDialogControllerImpl::FocusMoved() { | 1383 void AutofillDialogControllerImpl::FocusMoved() { |
1381 HidePopup(); | 1384 HidePopup(); |
1382 } | 1385 } |
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2959 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; | 2962 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; |
2960 } | 2963 } |
2961 | 2964 |
2962 // Has Wallet items. | 2965 // Has Wallet items. |
2963 return has_autofill_profiles ? | 2966 return has_autofill_profiles ? |
2964 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : | 2967 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : |
2965 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; | 2968 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; |
2966 } | 2969 } |
2967 | 2970 |
2968 } // namespace autofill | 2971 } // namespace autofill |
OLD | NEW |