Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
index a04bcafc058b74f793bff3140d51f775564e8c1d..b7f3c466c2badf0e3e9555ddb3857e193055424d 100644 |
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
@@ -698,11 +698,8 @@ bool OmniboxViewViews::OnMouseDragged(const ui::MouseEvent& event) { |
void OmniboxViewViews::OnMouseReleased(const ui::MouseEvent& event) { |
views::Textfield::OnMouseReleased(event); |
if (event.IsOnlyLeftMouseButton() || event.IsOnlyRightMouseButton()) { |
- // When the user has clicked and released to give us focus, select all |
- // unless we're omitting the URL (in which case refining an existing query |
- // is common enough that we do click-to-place-cursor). |
- if (select_all_on_mouse_release_ && |
- !controller()->GetToolbarModel()->WouldReplaceURL()) { |
+ // When the user has clicked and released to give us focus, select all. |
Peter Kasting
2016/08/13 05:03:44
Nit: Move this comment above the line above, and t
Marc Treib
2016/08/16 12:00:17
Done.
|
+ if (select_all_on_mouse_release_) { |
// Select all in the reverse direction so as not to scroll the caret |
// into view and shift the contents jarringly. |
SelectAll(true); |
@@ -884,8 +881,9 @@ bool OmniboxViewViews::IsCommandIdEnabled(int command_id) const { |
return !read_only() && !GetClipboardText().empty(); |
if (command_id == IDS_PASTE_AND_GO) |
return !read_only() && model()->CanPasteAndGo(GetClipboardText()); |
+ // TODO(treib): Completely remove IDS_SHOW_URL. crbug.com/627747 |
if (command_id == IDS_SHOW_URL) |
- return controller()->GetToolbarModel()->WouldReplaceURL(); |
+ return false; |
return Textfield::IsCommandIdEnabled(command_id) || |
location_bar_view_->command_updater()->IsCommandEnabled(command_id); |
} |