| Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| index 6fa564c80ed6cf52220c34dac82c0389ce3cc1ed..10c07424a0694b023f0efa7b46bfe79d27773706 100644
|
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| @@ -1065,7 +1065,7 @@ int LocationBarView::PageActionCount() {
|
| }
|
|
|
| int LocationBarView::PageActionVisibleCount() {
|
| - int result = 0;
|
| + size_t result = 0;
|
| for (const auto& action_view : page_action_views_) {
|
| if (action_view->visible())
|
| ++result;
|
| @@ -1116,6 +1116,16 @@ bool LocationBarView::GetBookmarkStarVisibility() {
|
| return star_view_->visible();
|
| }
|
|
|
| +int LocationBarView::ContentSettingImageModelCount() {
|
| + return content_setting_views_.size();
|
| +}
|
| +
|
| +ContentSettingImageModel* LocationBarView::GetContentSettingImageModel(
|
| + size_t index) {
|
| + DCHECK(index >= 0 && index < content_setting_views_.size());
|
| + return content_setting_views_.at(index)->content_setting_image_model();
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // LocationBarView, private views::View implementation:
|
|
|
| @@ -1242,3 +1252,20 @@ void LocationBarView::OnTemplateURLServiceChanged() {
|
| if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
|
| ShowFirstRunBubble();
|
| }
|
| +
|
| +////////////////////////////////////////////////////////////////////////////////
|
| +// LocationBarView, private function(s) for testing:
|
| +
|
| +ContentSettingImageView*
|
| +LocationBarView::GetContentSettingImageViewFromImageModel(
|
| + ContentSettingImageModel* image_model) {
|
| + for (auto i = content_setting_views_.begin();
|
| + i < content_setting_views_.end(); i++) {
|
| + if ((*i)->content_setting_image_model() == image_model)
|
| + return *i;
|
| + }
|
| + NOTREACHED();
|
| + return nullptr;
|
| +}
|
| +
|
| +
|
|
|