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

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

Issue 399063002: Remove BaseSearchProvider::set_in_app_list (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/app_list/search/omnibox_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 } 704 }
705 705
706 void OmniboxEditModel::OpenMatch(AutocompleteMatch match, 706 void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
707 WindowOpenDisposition disposition, 707 WindowOpenDisposition disposition,
708 const GURL& alternate_nav_url, 708 const GURL& alternate_nav_url,
709 const base::string16& pasted_text, 709 const base::string16& pasted_text,
710 size_t index) { 710 size_t index) {
711 const base::TimeTicks& now(base::TimeTicks::Now()); 711 const base::TimeTicks& now(base::TimeTicks::Now());
712 base::TimeDelta elapsed_time_since_user_first_modified_omnibox( 712 base::TimeDelta elapsed_time_since_user_first_modified_omnibox(
713 now - time_user_first_modified_omnibox_); 713 now - time_user_first_modified_omnibox_);
714 autocomplete_controller()->UpdateMatchDestinationURL( 714 autocomplete_controller()->UpdateMatchDestinationURLWithQueryFormulationTime(
715 elapsed_time_since_user_first_modified_omnibox, &match); 715 elapsed_time_since_user_first_modified_omnibox, &match);
716 716
717 base::string16 input_text(pasted_text); 717 base::string16 input_text(pasted_text);
718 if (input_text.empty()) 718 if (input_text.empty())
719 input_text = user_input_in_progress_ ? user_text_ : permanent_text_; 719 input_text = user_input_in_progress_ ? user_text_ : permanent_text_;
720 scoped_ptr<OmniboxNavigationObserver> observer( 720 scoped_ptr<OmniboxNavigationObserver> observer(
721 new OmniboxNavigationObserver( 721 new OmniboxNavigationObserver(
722 profile_, input_text, match, 722 profile_, input_text, match,
723 autocomplete_controller()->history_url_provider()->SuggestExactInput( 723 autocomplete_controller()->history_url_provider()->SuggestExactInput(
724 input_text, alternate_nav_url, 724 input_text, alternate_nav_url,
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 // Update state and notify view if the omnibox has focus and the caret 1472 // Update state and notify view if the omnibox has focus and the caret
1473 // visibility changed. 1473 // visibility changed.
1474 const bool was_caret_visible = is_caret_visible(); 1474 const bool was_caret_visible = is_caret_visible();
1475 focus_state_ = state; 1475 focus_state_ = state;
1476 if (focus_state_ != OMNIBOX_FOCUS_NONE && 1476 if (focus_state_ != OMNIBOX_FOCUS_NONE &&
1477 is_caret_visible() != was_caret_visible) 1477 is_caret_visible() != was_caret_visible)
1478 view_->ApplyCaretVisibility(); 1478 view_->ApplyCaretVisibility();
1479 1479
1480 delegate_->OnFocusChanged(focus_state_, reason); 1480 delegate_->OnFocusChanged(focus_state_, reason);
1481 } 1481 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/omnibox_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698