OLD | NEW |
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 WindowOpenDisposition disposition = | 177 WindowOpenDisposition disposition = |
178 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); | 178 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); |
179 omnibox_view_->model()->AcceptInput(disposition, false); | 179 omnibox_view_->model()->AcceptInput(disposition, false); |
180 } | 180 } |
181 | 181 |
182 void LocationBarViewMac::FocusLocation(bool select_all) { | 182 void LocationBarViewMac::FocusLocation(bool select_all) { |
183 omnibox_view_->FocusLocation(select_all); | 183 omnibox_view_->FocusLocation(select_all); |
184 } | 184 } |
185 | 185 |
186 void LocationBarViewMac::FocusSearch() { | 186 void LocationBarViewMac::FocusSearch() { |
187 omnibox_view_->SetForcedQuery(); | 187 omnibox_view_->EnterKeywordModeForDefaultSearchProvider(); |
188 } | 188 } |
189 | 189 |
190 void LocationBarViewMac::UpdateContentSettingsIcons() { | 190 void LocationBarViewMac::UpdateContentSettingsIcons() { |
191 if (RefreshContentSettingsDecorations()) | 191 if (RefreshContentSettingsDecorations()) |
192 OnDecorationsChanged(); | 192 OnDecorationsChanged(); |
193 } | 193 } |
194 | 194 |
195 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { | 195 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { |
196 WebContents* web_contents = GetWebContents(); | 196 WebContents* web_contents = GetWebContents(); |
197 if (!web_contents) | 197 if (!web_contents) |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 | 817 |
818 return zoom_decoration_->UpdateIfNecessary( | 818 return zoom_decoration_->UpdateIfNecessary( |
819 ui_zoom::ZoomController::FromWebContents(web_contents), | 819 ui_zoom::ZoomController::FromWebContents(web_contents), |
820 default_zoom_changed, IsLocationBarDark()); | 820 default_zoom_changed, IsLocationBarDark()); |
821 } | 821 } |
822 | 822 |
823 void LocationBarViewMac::OnDefaultZoomLevelChanged() { | 823 void LocationBarViewMac::OnDefaultZoomLevelChanged() { |
824 if (UpdateZoomDecoration(/*default_zoom_changed=*/true)) | 824 if (UpdateZoomDecoration(/*default_zoom_changed=*/true)) |
825 OnDecorationsChanged(); | 825 OnDecorationsChanged(); |
826 } | 826 } |
OLD | NEW |