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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

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 compilation on Mac and removed forced query unit tests Created 4 years, 8 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 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 WindowOpenDisposition disposition = 168 WindowOpenDisposition disposition =
169 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); 169 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]);
170 omnibox_view_->model()->AcceptInput(disposition, false); 170 omnibox_view_->model()->AcceptInput(disposition, false);
171 } 171 }
172 172
173 void LocationBarViewMac::FocusLocation(bool select_all) { 173 void LocationBarViewMac::FocusLocation(bool select_all) {
174 omnibox_view_->FocusLocation(select_all); 174 omnibox_view_->FocusLocation(select_all);
175 } 175 }
176 176
177 void LocationBarViewMac::FocusSearch() { 177 void LocationBarViewMac::FocusSearch() {
178 omnibox_view_->SetForcedQuery(); 178 omnibox_view_->EnterKeywordModeForDefaultSearchProvider();
179 } 179 }
180 180
181 void LocationBarViewMac::UpdateContentSettingsIcons() { 181 void LocationBarViewMac::UpdateContentSettingsIcons() {
182 if (RefreshContentSettingsDecorations()) 182 if (RefreshContentSettingsDecorations())
183 OnDecorationsChanged(); 183 OnDecorationsChanged();
184 } 184 }
185 185
186 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { 186 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() {
187 WebContents* web_contents = GetWebContents(); 187 WebContents* web_contents = GetWebContents();
188 if (!web_contents) 188 if (!web_contents)
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 return zoom_decoration_->UpdateIfNecessary( 786 return zoom_decoration_->UpdateIfNecessary(
787 ui_zoom::ZoomController::FromWebContents(web_contents), 787 ui_zoom::ZoomController::FromWebContents(web_contents),
788 default_zoom_changed, 788 default_zoom_changed,
789 inDarkMode); 789 inDarkMode);
790 } 790 }
791 791
792 void LocationBarViewMac::OnDefaultZoomLevelChanged() { 792 void LocationBarViewMac::OnDefaultZoomLevelChanged() {
793 if (UpdateZoomDecoration(/*default_zoom_changed=*/true)) 793 if (UpdateZoomDecoration(/*default_zoom_changed=*/true))
794 OnDecorationsChanged(); 794 OnDecorationsChanged();
795 } 795 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698