OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/omnibox/omnibox_edit_model.h" | 5 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
749 fake_single_entry_matches.push_back(match); | 749 fake_single_entry_matches.push_back(match); |
750 AutocompleteResult fake_single_entry_result; | 750 AutocompleteResult fake_single_entry_result; |
751 fake_single_entry_result.AppendMatches(fake_single_entry_matches); | 751 fake_single_entry_result.AppendMatches(fake_single_entry_matches); |
752 OmniboxLog log( | 752 OmniboxLog log( |
753 input_text, | 753 input_text, |
754 just_deleted_text_, | 754 just_deleted_text_, |
755 input_.type(), | 755 input_.type(), |
756 popup_model()->IsOpen(), | 756 popup_model()->IsOpen(), |
757 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 0 : index, | 757 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 0 : index, |
758 !pasted_text.empty(), | 758 !pasted_text.empty(), |
759 paste_state_ != NONE, | |
grt (UTC plus 2)
2014/12/12 14:43:49
nit:
paste_state_ != NONE, // last_action_w
Mark P
2014/12/12 20:44:33
Done.
| |
759 -1, // don't yet know tab ID; set later if appropriate | 760 -1, // don't yet know tab ID; set later if appropriate |
760 ClassifyPage(), | 761 ClassifyPage(), |
761 elapsed_time_since_user_first_modified_omnibox, | 762 elapsed_time_since_user_first_modified_omnibox, |
762 match.allowed_to_be_default_match ? match.inline_autocompletion.length() : | 763 match.allowed_to_be_default_match ? match.inline_autocompletion.length() : |
763 base::string16::npos, | 764 base::string16::npos, |
764 elapsed_time_since_last_change_to_default_match, | 765 elapsed_time_since_last_change_to_default_match, |
765 (!popup_model()->IsOpen() || !pasted_text.empty()) ? | 766 (!popup_model()->IsOpen() || !pasted_text.empty()) ? |
766 fake_single_entry_result : result()); | 767 fake_single_entry_result : result()); |
767 DCHECK(!popup_model()->IsOpen() || !pasted_text.empty() || | 768 DCHECK(!popup_model()->IsOpen() || !pasted_text.empty() || |
768 (log.elapsed_time_since_user_first_modified_omnibox >= | 769 (log.elapsed_time_since_user_first_modified_omnibox >= |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1474 // Update state and notify view if the omnibox has focus and the caret | 1475 // Update state and notify view if the omnibox has focus and the caret |
1475 // visibility changed. | 1476 // visibility changed. |
1476 const bool was_caret_visible = is_caret_visible(); | 1477 const bool was_caret_visible = is_caret_visible(); |
1477 focus_state_ = state; | 1478 focus_state_ = state; |
1478 if (focus_state_ != OMNIBOX_FOCUS_NONE && | 1479 if (focus_state_ != OMNIBOX_FOCUS_NONE && |
1479 is_caret_visible() != was_caret_visible) | 1480 is_caret_visible() != was_caret_visible) |
1480 view_->ApplyCaretVisibility(); | 1481 view_->ApplyCaretVisibility(); |
1481 | 1482 |
1482 delegate_->OnFocusChanged(focus_state_, reason); | 1483 delegate_->OnFocusChanged(focus_state_, reason); |
1483 } | 1484 } |
OLD | NEW |