| 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 #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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |