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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 1855423003: Interpret '?' and Ctrl-K or Ctrl-E as putting omnibox in keyword search mode for Default Search Pro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add includes for mac tests Created 4 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 ui::PageTransition LocationBarView::GetPageTransition() const { 1079 ui::PageTransition LocationBarView::GetPageTransition() const {
1080 return transition(); 1080 return transition();
1081 } 1081 }
1082 1082
1083 void LocationBarView::AcceptInput() { 1083 void LocationBarView::AcceptInput() {
1084 omnibox_view_->model()->AcceptInput(CURRENT_TAB, false); 1084 omnibox_view_->model()->AcceptInput(CURRENT_TAB, false);
1085 } 1085 }
1086 1086
1087 void LocationBarView::FocusSearch() { 1087 void LocationBarView::FocusSearch() {
1088 omnibox_view_->SetFocus(); 1088 omnibox_view_->SetFocus();
1089 omnibox_view_->SetForcedQuery(); 1089 omnibox_view_->EnterKeywordModeForDefaultSearchProvider();
1090 } 1090 }
1091 1091
1092 void LocationBarView::UpdateContentSettingsIcons() { 1092 void LocationBarView::UpdateContentSettingsIcons() {
1093 if (RefreshContentSettingViews()) { 1093 if (RefreshContentSettingViews()) {
1094 Layout(); 1094 Layout();
1095 SchedulePaint(); 1095 SchedulePaint();
1096 } 1096 }
1097 } 1097 }
1098 1098
1099 void LocationBarView::UpdateManagePasswordsIconAndBubble() { 1099 void LocationBarView::UpdateManagePasswordsIconAndBubble() {
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 // LocationBarView, private TemplateURLServiceObserver implementation: 1389 // LocationBarView, private TemplateURLServiceObserver implementation:
1390 1390
1391 void LocationBarView::OnTemplateURLServiceChanged() { 1391 void LocationBarView::OnTemplateURLServiceChanged() {
1392 template_url_service_->RemoveObserver(this); 1392 template_url_service_->RemoveObserver(this);
1393 template_url_service_ = nullptr; 1393 template_url_service_ = nullptr;
1394 // If the browser is no longer active, let's not show the info bubble, as this 1394 // If the browser is no longer active, let's not show the info bubble, as this
1395 // would make the browser the active window again. 1395 // would make the browser the active window again.
1396 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1396 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1397 ShowFirstRunBubble(); 1397 ShowFirstRunBubble();
1398 } 1398 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_test_utils.cc ('k') | chrome/browser/ui/views/location_bar/location_icon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698