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

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: Rebase, make '?' enter keyword mode on nonempty inputs 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 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 #import "base/mac/mac_util.h" 9 #import "base/mac/mac_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 WindowOpenDisposition disposition = 172 WindowOpenDisposition disposition =
173 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); 173 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]);
174 omnibox_view_->model()->AcceptInput(disposition, false); 174 omnibox_view_->model()->AcceptInput(disposition, false);
175 } 175 }
176 176
177 void LocationBarViewMac::FocusLocation(bool select_all) { 177 void LocationBarViewMac::FocusLocation(bool select_all) {
178 omnibox_view_->FocusLocation(select_all); 178 omnibox_view_->FocusLocation(select_all);
179 } 179 }
180 180
181 void LocationBarViewMac::FocusSearch() { 181 void LocationBarViewMac::FocusSearch() {
182 omnibox_view_->SetForcedQuery(); 182 omnibox_view_->EnterKeywordModeForDefaultSearchProvider();
183 } 183 }
184 184
185 void LocationBarViewMac::UpdateContentSettingsIcons() { 185 void LocationBarViewMac::UpdateContentSettingsIcons() {
186 if (RefreshContentSettingsDecorations()) 186 if (RefreshContentSettingsDecorations())
187 OnDecorationsChanged(); 187 OnDecorationsChanged();
188 } 188 }
189 189
190 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { 190 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() {
191 WebContents* web_contents = GetWebContents(); 191 WebContents* web_contents = GetWebContents();
192 if (!web_contents) 192 if (!web_contents)
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 807
808 return zoom_decoration_->UpdateIfNecessary( 808 return zoom_decoration_->UpdateIfNecessary(
809 ui_zoom::ZoomController::FromWebContents(web_contents), 809 ui_zoom::ZoomController::FromWebContents(web_contents),
810 default_zoom_changed, IsLocationBarDark()); 810 default_zoom_changed, IsLocationBarDark());
811 } 811 }
812 812
813 void LocationBarViewMac::OnDefaultZoomLevelChanged() { 813 void LocationBarViewMac::OnDefaultZoomLevelChanged() {
814 if (UpdateZoomDecoration(/*default_zoom_changed=*/true)) 814 if (UpdateZoomDecoration(/*default_zoom_changed=*/true))
815 OnDecorationsChanged(); 815 OnDecorationsChanged();
816 } 816 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698