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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1090 } | 1090 } |
1091 | 1091 |
1092 NOTREACHED(); | 1092 NOTREACHED(); |
1093 } | 1093 } |
1094 | 1094 |
1095 bool LocationBarView::GetBookmarkStarVisibility() { | 1095 bool LocationBarView::GetBookmarkStarVisibility() { |
1096 DCHECK(star_view_); | 1096 DCHECK(star_view_); |
1097 return star_view_->visible(); | 1097 return star_view_->visible(); |
1098 } | 1098 } |
1099 | 1099 |
1100 bool LocationBarView::TestContentSettingImagePressed(size_t index) { | |
1101 if (index >= content_setting_views_.size()) | |
1102 return false; | |
1103 | |
1104 views::View* image_view = content_setting_views_[index]; | |
1105 image_view->OnKeyPressed( | |
1106 ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_SPACE, ui::EF_NONE)); | |
1107 return true; | |
1108 } | |
kylix_rd
2017/02/06 14:12:40
Doesn't relying on the number and order of the ite
| |
1109 | |
1100 //////////////////////////////////////////////////////////////////////////////// | 1110 //////////////////////////////////////////////////////////////////////////////// |
1101 // LocationBarView, private views::View implementation: | 1111 // LocationBarView, private views::View implementation: |
1102 | 1112 |
1103 const char* LocationBarView::GetClassName() const { | 1113 const char* LocationBarView::GetClassName() const { |
1104 return kViewClassName; | 1114 return kViewClassName; |
1105 } | 1115 } |
1106 | 1116 |
1107 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { | 1117 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { |
1108 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view(); | 1118 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view(); |
1109 if (popup->IsOpen()) | 1119 if (popup->IsOpen()) |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1211 // LocationBarView, private TemplateURLServiceObserver implementation: | 1221 // LocationBarView, private TemplateURLServiceObserver implementation: |
1212 | 1222 |
1213 void LocationBarView::OnTemplateURLServiceChanged() { | 1223 void LocationBarView::OnTemplateURLServiceChanged() { |
1214 template_url_service_->RemoveObserver(this); | 1224 template_url_service_->RemoveObserver(this); |
1215 template_url_service_ = nullptr; | 1225 template_url_service_ = nullptr; |
1216 // If the browser is no longer active, let's not show the info bubble, as this | 1226 // If the browser is no longer active, let's not show the info bubble, as this |
1217 // would make the browser the active window again. | 1227 // would make the browser the active window again. |
1218 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1228 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
1219 ShowFirstRunBubble(); | 1229 ShowFirstRunBubble(); |
1220 } | 1230 } |
OLD | NEW |