Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 872433003: Remove omnibox watcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 ACMatches fake_single_entry_matches; 736 ACMatches fake_single_entry_matches;
737 fake_single_entry_matches.push_back(match); 737 fake_single_entry_matches.push_back(match);
738 AutocompleteResult fake_single_entry_result; 738 AutocompleteResult fake_single_entry_result;
739 fake_single_entry_result.AppendMatches(fake_single_entry_matches); 739 fake_single_entry_result.AppendMatches(fake_single_entry_matches);
740 OmniboxLog log( 740 OmniboxLog log(
741 input_text, 741 input_text,
742 just_deleted_text_, 742 just_deleted_text_,
743 input_.type(), 743 input_.type(),
744 popup_model()->IsOpen(), 744 popup_model()->IsOpen(),
745 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 0 : index, 745 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 0 : index,
746 !pasted_text.empty(), // is_paste_and_go 746 !pasted_text.empty(),
747 paste_state_ != NONE, // last_action_was_paste
748 -1, // don't yet know tab ID; set later if appropriate 747 -1, // don't yet know tab ID; set later if appropriate
749 ClassifyPage(), 748 ClassifyPage(),
750 elapsed_time_since_user_first_modified_omnibox, 749 elapsed_time_since_user_first_modified_omnibox,
751 match.allowed_to_be_default_match ? match.inline_autocompletion.length() : 750 match.allowed_to_be_default_match ? match.inline_autocompletion.length() :
752 base::string16::npos, 751 base::string16::npos,
753 elapsed_time_since_last_change_to_default_match, 752 elapsed_time_since_last_change_to_default_match,
754 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 753 (!popup_model()->IsOpen() || !pasted_text.empty()) ?
755 fake_single_entry_result : result()); 754 fake_single_entry_result : result());
756 DCHECK(!popup_model()->IsOpen() || !pasted_text.empty() || 755 DCHECK(!popup_model()->IsOpen() || !pasted_text.empty() ||
757 (log.elapsed_time_since_user_first_modified_omnibox >= 756 (log.elapsed_time_since_user_first_modified_omnibox >=
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 // Update state and notify view if the omnibox has focus and the caret 1462 // Update state and notify view if the omnibox has focus and the caret
1464 // visibility changed. 1463 // visibility changed.
1465 const bool was_caret_visible = is_caret_visible(); 1464 const bool was_caret_visible = is_caret_visible();
1466 focus_state_ = state; 1465 focus_state_ = state;
1467 if (focus_state_ != OMNIBOX_FOCUS_NONE && 1466 if (focus_state_ != OMNIBOX_FOCUS_NONE &&
1468 is_caret_visible() != was_caret_visible) 1467 is_caret_visible() != was_caret_visible)
1469 view_->ApplyCaretVisibility(); 1468 view_->ApplyCaretVisibility();
1470 1469
1471 delegate_->OnFocusChanged(focus_state_, reason); 1470 delegate_->OnFocusChanged(focus_state_, reason);
1472 } 1471 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698