| 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 ACMatches fake_single_entry_matches; | 748 ACMatches fake_single_entry_matches; |
| 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(), // is_paste_and_go | 758 !pasted_text.empty(), |
| 759 paste_state_ != NONE, // last_action_was_paste | |
| 760 -1, // don't yet know tab ID; set later if appropriate | 759 -1, // don't yet know tab ID; set later if appropriate |
| 761 ClassifyPage(), | 760 ClassifyPage(), |
| 762 elapsed_time_since_user_first_modified_omnibox, | 761 elapsed_time_since_user_first_modified_omnibox, |
| 763 match.allowed_to_be_default_match ? match.inline_autocompletion.length() : | 762 match.allowed_to_be_default_match ? match.inline_autocompletion.length() : |
| 764 base::string16::npos, | 763 base::string16::npos, |
| 765 elapsed_time_since_last_change_to_default_match, | 764 elapsed_time_since_last_change_to_default_match, |
| 766 (!popup_model()->IsOpen() || !pasted_text.empty()) ? | 765 (!popup_model()->IsOpen() || !pasted_text.empty()) ? |
| 767 fake_single_entry_result : result()); | 766 fake_single_entry_result : result()); |
| 768 DCHECK(!popup_model()->IsOpen() || !pasted_text.empty() || | 767 DCHECK(!popup_model()->IsOpen() || !pasted_text.empty() || |
| 769 (log.elapsed_time_since_user_first_modified_omnibox >= | 768 (log.elapsed_time_since_user_first_modified_omnibox >= |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 // Update state and notify view if the omnibox has focus and the caret | 1474 // Update state and notify view if the omnibox has focus and the caret |
| 1476 // visibility changed. | 1475 // visibility changed. |
| 1477 const bool was_caret_visible = is_caret_visible(); | 1476 const bool was_caret_visible = is_caret_visible(); |
| 1478 focus_state_ = state; | 1477 focus_state_ = state; |
| 1479 if (focus_state_ != OMNIBOX_FOCUS_NONE && | 1478 if (focus_state_ != OMNIBOX_FOCUS_NONE && |
| 1480 is_caret_visible() != was_caret_visible) | 1479 is_caret_visible() != was_caret_visible) |
| 1481 view_->ApplyCaretVisibility(); | 1480 view_->ApplyCaretVisibility(); |
| 1482 | 1481 |
| 1483 delegate_->OnFocusChanged(focus_state_, reason); | 1482 delegate_->OnFocusChanged(focus_state_, reason); |
| 1484 } | 1483 } |
| OLD | NEW |