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

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: Fixed unit test compilation Created 4 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 (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 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 ui::PageTransition LocationBarView::GetPageTransition() const { 1082 ui::PageTransition LocationBarView::GetPageTransition() const {
1083 return transition(); 1083 return transition();
1084 } 1084 }
1085 1085
1086 void LocationBarView::AcceptInput() { 1086 void LocationBarView::AcceptInput() {
1087 omnibox_view_->model()->AcceptInput(CURRENT_TAB, false); 1087 omnibox_view_->model()->AcceptInput(CURRENT_TAB, false);
1088 } 1088 }
1089 1089
1090 void LocationBarView::FocusSearch() { 1090 void LocationBarView::FocusSearch() {
1091 omnibox_view_->SetFocus(); 1091 omnibox_view_->SetFocus();
1092 omnibox_view_->SetForcedQuery(); 1092 omnibox_view_->EnterKeywordModeForDefaultSearchProvider();
1093 } 1093 }
1094 1094
1095 void LocationBarView::UpdateContentSettingsIcons() { 1095 void LocationBarView::UpdateContentSettingsIcons() {
1096 if (RefreshContentSettingViews()) { 1096 if (RefreshContentSettingViews()) {
1097 Layout(); 1097 Layout();
1098 SchedulePaint(); 1098 SchedulePaint();
1099 } 1099 }
1100 } 1100 }
1101 1101
1102 void LocationBarView::UpdateManagePasswordsIconAndBubble() { 1102 void LocationBarView::UpdateManagePasswordsIconAndBubble() {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 // LocationBarView, private TemplateURLServiceObserver implementation: 1384 // LocationBarView, private TemplateURLServiceObserver implementation:
1385 1385
1386 void LocationBarView::OnTemplateURLServiceChanged() { 1386 void LocationBarView::OnTemplateURLServiceChanged() {
1387 template_url_service_->RemoveObserver(this); 1387 template_url_service_->RemoveObserver(this);
1388 template_url_service_ = nullptr; 1388 template_url_service_ = nullptr;
1389 // If the browser is no longer active, let's not show the info bubble, as this 1389 // If the browser is no longer active, let's not show the info bubble, as this
1390 // would make the browser the active window again. 1390 // would make the browser the active window again.
1391 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1391 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1392 ShowFirstRunBubble(); 1392 ShowFirstRunBubble();
1393 } 1393 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698