| 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 "ui/views/controls/prefix_selector.h" | 5 #include "ui/views/controls/prefix_selector.h" |
| 6 | 6 |
| 7 #include "base/i18n/case_conversion.h" | 7 #include "base/i18n/case_conversion.h" |
| 8 #include "ui/base/ime/input_method.h" |
| 8 #include "ui/base/ime/text_input_type.h" | 9 #include "ui/base/ime/text_input_type.h" |
| 9 #include "ui/gfx/range/range.h" | 10 #include "ui/gfx/range/range.h" |
| 10 #include "ui/views/controls/prefix_delegate.h" | 11 #include "ui/views/controls/prefix_delegate.h" |
| 11 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
| 12 | 13 |
| 13 namespace views { | 14 namespace views { |
| 14 | 15 |
| 15 namespace { | 16 namespace { |
| 16 | 17 |
| 17 const int64 kTimeBeforeClearingMS = 1000; | 18 const int64 kTimeBeforeClearingMS = 1000; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 return (model_text.size() >= lower_text.size()) && | 191 return (model_text.size() >= lower_text.size()) && |
| 191 (model_text.compare(0, lower_text.size(), lower_text) == 0); | 192 (model_text.compare(0, lower_text.size(), lower_text) == 0); |
| 192 } | 193 } |
| 193 | 194 |
| 194 void PrefixSelector::ClearText() { | 195 void PrefixSelector::ClearText() { |
| 195 current_text_.clear(); | 196 current_text_.clear(); |
| 196 time_of_last_key_ = base::TimeTicks(); | 197 time_of_last_key_ = base::TimeTicks(); |
| 197 } | 198 } |
| 198 | 199 |
| 199 } // namespace views | 200 } // namespace views |
| OLD | NEW |