| 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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 | 1070 |
| 1071 WindowOpenDisposition LocationBarView::GetWindowOpenDisposition() const { | 1071 WindowOpenDisposition LocationBarView::GetWindowOpenDisposition() const { |
| 1072 return disposition(); | 1072 return disposition(); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 ui::PageTransition LocationBarView::GetPageTransition() const { | 1075 ui::PageTransition LocationBarView::GetPageTransition() const { |
| 1076 return transition(); | 1076 return transition(); |
| 1077 } | 1077 } |
| 1078 | 1078 |
| 1079 void LocationBarView::AcceptInput() { | 1079 void LocationBarView::AcceptInput() { |
| 1080 omnibox_view_->model()->AcceptInput(CURRENT_TAB, false); | 1080 omnibox_view_->model()->AcceptInput(WindowOpenDisposition::CURRENT_TAB, |
| 1081 false); |
| 1081 } | 1082 } |
| 1082 | 1083 |
| 1083 void LocationBarView::FocusSearch() { | 1084 void LocationBarView::FocusSearch() { |
| 1084 omnibox_view_->SetFocus(); | 1085 omnibox_view_->SetFocus(); |
| 1085 omnibox_view_->EnterKeywordModeForDefaultSearchProvider(); | 1086 omnibox_view_->EnterKeywordModeForDefaultSearchProvider(); |
| 1086 } | 1087 } |
| 1087 | 1088 |
| 1088 void LocationBarView::UpdateContentSettingsIcons() { | 1089 void LocationBarView::UpdateContentSettingsIcons() { |
| 1089 if (RefreshContentSettingViews()) { | 1090 if (RefreshContentSettingViews()) { |
| 1090 Layout(); | 1091 Layout(); |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 // LocationBarView, private TemplateURLServiceObserver implementation: | 1386 // LocationBarView, private TemplateURLServiceObserver implementation: |
| 1386 | 1387 |
| 1387 void LocationBarView::OnTemplateURLServiceChanged() { | 1388 void LocationBarView::OnTemplateURLServiceChanged() { |
| 1388 template_url_service_->RemoveObserver(this); | 1389 template_url_service_->RemoveObserver(this); |
| 1389 template_url_service_ = nullptr; | 1390 template_url_service_ = nullptr; |
| 1390 // If the browser is no longer active, let's not show the info bubble, as this | 1391 // If the browser is no longer active, let's not show the info bubble, as this |
| 1391 // would make the browser the active window again. | 1392 // would make the browser the active window again. |
| 1392 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1393 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
| 1393 ShowFirstRunBubble(); | 1394 ShowFirstRunBubble(); |
| 1394 } | 1395 } |
| OLD | NEW |