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

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

Issue 1155673002: Omnibox - Add About Flag to Reverse Title and URLs in the Dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac and add command line flag to histograms.xml Created 5 years, 7 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 elapsed_time_since_user_first_modified_omnibox = default_time_delta; 776 elapsed_time_since_user_first_modified_omnibox = default_time_delta;
777 elapsed_time_since_last_change_to_default_match = default_time_delta; 777 elapsed_time_since_last_change_to_default_match = default_time_delta;
778 } 778 }
779 // If the popup is closed or this is a paste-and-go action (meaning the 779 // If the popup is closed or this is a paste-and-go action (meaning the
780 // contents of the dropdown are ignored regardless), we record for logging 780 // contents of the dropdown are ignored regardless), we record for logging
781 // purposes a selected_index of 0 and a suggestion list as having a single 781 // purposes a selected_index of 0 and a suggestion list as having a single
782 // entry of the match used. 782 // entry of the match used.
783 ACMatches fake_single_entry_matches; 783 ACMatches fake_single_entry_matches;
784 fake_single_entry_matches.push_back(match); 784 fake_single_entry_matches.push_back(match);
785 AutocompleteResult fake_single_entry_result; 785 AutocompleteResult fake_single_entry_result;
786 fake_single_entry_result.AppendMatches(fake_single_entry_matches); 786 fake_single_entry_result.AppendMatches(input_, fake_single_entry_matches);
787 OmniboxLog log( 787 OmniboxLog log(
788 input_text, 788 input_text,
789 just_deleted_text_, 789 just_deleted_text_,
790 input_.type(), 790 input_.type(),
791 popup_model()->IsOpen(), 791 popup_model()->IsOpen(),
792 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 0 : index, 792 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 0 : index,
793 !pasted_text.empty(), 793 !pasted_text.empty(),
794 -1, // don't yet know tab ID; set later if appropriate 794 -1, // don't yet know tab ID; set later if appropriate
795 ClassifyPage(), 795 ClassifyPage(),
796 elapsed_time_since_user_first_modified_omnibox, 796 elapsed_time_since_user_first_modified_omnibox,
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 // Update state and notify view if the omnibox has focus and the caret 1536 // Update state and notify view if the omnibox has focus and the caret
1537 // visibility changed. 1537 // visibility changed.
1538 const bool was_caret_visible = is_caret_visible(); 1538 const bool was_caret_visible = is_caret_visible();
1539 focus_state_ = state; 1539 focus_state_ = state;
1540 if (focus_state_ != OMNIBOX_FOCUS_NONE && 1540 if (focus_state_ != OMNIBOX_FOCUS_NONE &&
1541 is_caret_visible() != was_caret_visible) 1541 is_caret_visible() != was_caret_visible)
1542 view_->ApplyCaretVisibility(); 1542 view_->ApplyCaretVisibility();
1543 1543
1544 delegate_->OnFocusChanged(focus_state_, reason); 1544 delegate_->OnFocusChanged(focus_state_, reason);
1545 } 1545 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698