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/autofill/autofill_popup_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 namespace autofill { | 26 namespace autofill { |
27 namespace { | 27 namespace { |
28 | 28 |
29 // Used to indicate that no line is currently selected by the user. | 29 // Used to indicate that no line is currently selected by the user. |
30 const int kNoSelection = -1; | 30 const int kNoSelection = -1; |
31 | 31 |
32 | 32 |
33 #if !defined(OS_ANDROID) | 33 #if !defined(OS_ANDROID) |
34 // Size difference between name and label in pixels. | 34 // Size difference between name and label in pixels. |
35 const int kLabelFontSizeDelta = -2; | 35 const int kLabelFontSizeDelta = -3; |
36 #endif | 36 #endif |
37 | 37 |
38 } // namespace | 38 } // namespace |
39 | 39 |
40 // static | 40 // static |
41 WeakPtr<AutofillPopupControllerImpl> AutofillPopupControllerImpl::GetOrCreate( | 41 WeakPtr<AutofillPopupControllerImpl> AutofillPopupControllerImpl::GetOrCreate( |
42 WeakPtr<AutofillPopupControllerImpl> previous, | 42 WeakPtr<AutofillPopupControllerImpl> previous, |
43 WeakPtr<AutofillPopupDelegate> delegate, | 43 WeakPtr<AutofillPopupDelegate> delegate, |
44 content::WebContents* web_contents, | 44 content::WebContents* web_contents, |
45 gfx::NativeView container_view, | 45 gfx::NativeView container_view, |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 // Don't clear view_, because otherwise the popup will have to get regenerated | 553 // Don't clear view_, because otherwise the popup will have to get regenerated |
554 // and this will cause flickering. | 554 // and this will cause flickering. |
555 suggestions_.clear(); | 555 suggestions_.clear(); |
556 elided_values_.clear(); | 556 elided_values_.clear(); |
557 elided_labels_.clear(); | 557 elided_labels_.clear(); |
558 | 558 |
559 selected_line_ = kNoSelection; | 559 selected_line_ = kNoSelection; |
560 } | 560 } |
561 | 561 |
562 } // namespace autofill | 562 } // namespace autofill |
OLD | NEW |