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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 WindowOpenDisposition disposition = | 328 WindowOpenDisposition disposition = |
329 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); | 329 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); |
330 omnibox_view_->model()->AcceptInput(disposition, false); | 330 omnibox_view_->model()->AcceptInput(disposition, false); |
331 } | 331 } |
332 | 332 |
333 void LocationBarViewMac::FocusLocation(bool select_all) { | 333 void LocationBarViewMac::FocusLocation(bool select_all) { |
334 omnibox_view_->FocusLocation(select_all); | 334 omnibox_view_->FocusLocation(select_all); |
335 } | 335 } |
336 | 336 |
337 void LocationBarViewMac::FocusSearch() { | 337 void LocationBarViewMac::FocusSearch() { |
338 omnibox_view_->SetForcedQuery(); | 338 omnibox_view_->EnterKeywordModeForDefaultSearchProvider(); |
339 } | 339 } |
340 | 340 |
341 void LocationBarViewMac::UpdateContentSettingsIcons() { | 341 void LocationBarViewMac::UpdateContentSettingsIcons() { |
342 if (RefreshContentSettingsDecorations()) | 342 if (RefreshContentSettingsDecorations()) |
343 OnDecorationsChanged(); | 343 OnDecorationsChanged(); |
344 } | 344 } |
345 | 345 |
346 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { | 346 void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { |
347 WebContents* web_contents = GetWebContents(); | 347 WebContents* web_contents = GetWebContents(); |
348 if (!web_contents) | 348 if (!web_contents) |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 | 969 |
970 return zoom_decoration_->UpdateIfNecessary( | 970 return zoom_decoration_->UpdateIfNecessary( |
971 zoom::ZoomController::FromWebContents(web_contents), default_zoom_changed, | 971 zoom::ZoomController::FromWebContents(web_contents), default_zoom_changed, |
972 IsLocationBarDark()); | 972 IsLocationBarDark()); |
973 } | 973 } |
974 | 974 |
975 void LocationBarViewMac::OnDefaultZoomLevelChanged() { | 975 void LocationBarViewMac::OnDefaultZoomLevelChanged() { |
976 if (UpdateZoomDecoration(/*default_zoom_changed=*/true)) | 976 if (UpdateZoomDecoration(/*default_zoom_changed=*/true)) |
977 OnDecorationsChanged(); | 977 OnDecorationsChanged(); |
978 } | 978 } |
OLD | NEW |