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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1067 } | 1067 } |
1068 | 1068 |
1069 NOTREACHED(); | 1069 NOTREACHED(); |
1070 } | 1070 } |
1071 | 1071 |
1072 bool LocationBarView::GetBookmarkStarVisibility() { | 1072 bool LocationBarView::GetBookmarkStarVisibility() { |
1073 DCHECK(star_view_); | 1073 DCHECK(star_view_); |
1074 return star_view_->visible(); | 1074 return star_view_->visible(); |
1075 } | 1075 } |
1076 | 1076 |
1077 bool LocationBarView::TestContentSettingImagePressed(size_t index) { | |
1078 if (index >= content_setting_views_.size()) | |
1079 return false; | |
1080 | |
1081 // This up-cast is necessary since the descendant class moved OnKeyPressed | |
1082 // to the protected section. | |
Peter Kasting
2017/02/15 01:14:01
My instinct is that we should just make that publi
kylix_rd
2017/02/15 16:42:59
Yes, true. However, moving overrides to private se
Peter Kasting
2017/02/15 19:11:39
I'm usually responsible for pushing for that -- my
| |
1083 views::View* image_view = content_setting_views_[index]; | |
1084 image_view->OnKeyReleased( | |
1085 ui::KeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_SPACE, ui::EF_NONE)); | |
1086 return true; | |
1087 } | |
1088 | |
1077 //////////////////////////////////////////////////////////////////////////////// | 1089 //////////////////////////////////////////////////////////////////////////////// |
1078 // LocationBarView, private views::View implementation: | 1090 // LocationBarView, private views::View implementation: |
1079 | 1091 |
1080 const char* LocationBarView::GetClassName() const { | 1092 const char* LocationBarView::GetClassName() const { |
1081 return kViewClassName; | 1093 return kViewClassName; |
1082 } | 1094 } |
1083 | 1095 |
1084 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { | 1096 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { |
1085 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view(); | 1097 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view(); |
1086 if (popup->IsOpen()) | 1098 if (popup->IsOpen()) |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1188 // LocationBarView, private TemplateURLServiceObserver implementation: | 1200 // LocationBarView, private TemplateURLServiceObserver implementation: |
1189 | 1201 |
1190 void LocationBarView::OnTemplateURLServiceChanged() { | 1202 void LocationBarView::OnTemplateURLServiceChanged() { |
1191 template_url_service_->RemoveObserver(this); | 1203 template_url_service_->RemoveObserver(this); |
1192 template_url_service_ = nullptr; | 1204 template_url_service_ = nullptr; |
1193 // If the browser is no longer active, let's not show the info bubble, as this | 1205 // If the browser is no longer active, let's not show the info bubble, as this |
1194 // would make the browser the active window again. | 1206 // would make the browser the active window again. |
1195 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1207 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
1196 ShowFirstRunBubble(); | 1208 ShowFirstRunBubble(); |
1197 } | 1209 } |
OLD | NEW |