OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 ui::PageTransition LocationBarView::GetPageTransition() const { | 1082 ui::PageTransition LocationBarView::GetPageTransition() const { |
1083 return transition(); | 1083 return transition(); |
1084 } | 1084 } |
1085 | 1085 |
1086 void LocationBarView::AcceptInput() { | 1086 void LocationBarView::AcceptInput() { |
1087 omnibox_view_->model()->AcceptInput(CURRENT_TAB, false); | 1087 omnibox_view_->model()->AcceptInput(CURRENT_TAB, false); |
1088 } | 1088 } |
1089 | 1089 |
1090 void LocationBarView::FocusSearch() { | 1090 void LocationBarView::FocusSearch() { |
1091 omnibox_view_->SetFocus(); | 1091 omnibox_view_->SetFocus(); |
1092 omnibox_view_->SetForcedQuery(); | 1092 omnibox_view_->EnterKeywordModeForDefaultSearchProvider(); |
1093 } | 1093 } |
1094 | 1094 |
1095 void LocationBarView::UpdateContentSettingsIcons() { | 1095 void LocationBarView::UpdateContentSettingsIcons() { |
1096 if (RefreshContentSettingViews()) { | 1096 if (RefreshContentSettingViews()) { |
1097 Layout(); | 1097 Layout(); |
1098 SchedulePaint(); | 1098 SchedulePaint(); |
1099 } | 1099 } |
1100 } | 1100 } |
1101 | 1101 |
1102 void LocationBarView::UpdateManagePasswordsIconAndBubble() { | 1102 void LocationBarView::UpdateManagePasswordsIconAndBubble() { |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 // LocationBarView, private TemplateURLServiceObserver implementation: | 1384 // LocationBarView, private TemplateURLServiceObserver implementation: |
1385 | 1385 |
1386 void LocationBarView::OnTemplateURLServiceChanged() { | 1386 void LocationBarView::OnTemplateURLServiceChanged() { |
1387 template_url_service_->RemoveObserver(this); | 1387 template_url_service_->RemoveObserver(this); |
1388 template_url_service_ = nullptr; | 1388 template_url_service_ = nullptr; |
1389 // If the browser is no longer active, let's not show the info bubble, as this | 1389 // If the browser is no longer active, let's not show the info bubble, as this |
1390 // would make the browser the active window again. | 1390 // would make the browser the active window again. |
1391 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1391 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
1392 ShowFirstRunBubble(); | 1392 ShowFirstRunBubble(); |
1393 } | 1393 } |
OLD | NEW |