Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm |
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm |
index 5c4a91e5b43a8b01b66e2755aa1c50d1582fbc0f..7cc34f14f15b19a968d7dd22f0b4db408e2e4de9 100644 |
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm |
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm |
@@ -332,6 +332,16 @@ bool LocationBarViewMac::GetBookmarkStarVisibility() { |
return star_decoration_->IsVisible(); |
} |
+int LocationBarViewMac::ContentSettingImageModelCount() { |
+ return content_setting_decorations_.size(); |
+} |
+ |
+ContentSettingImageModel* LocationBarViewMac::GetContentSettingImageModel( |
+ size_t index) { |
+ DCHECK(index >= 0 && index < content_setting_decorations_.size()); |
tapted
2017/02/03 00:35:39
optional: remove - .at(..) will throw an exception
kylix_rd
2017/02/03 18:55:03
Are exceptions OK in the Mac world?
Peter Kasting
2017/02/03 22:20:41
For reference, in .cc files I ask people to avoid
tapted
2017/02/03 23:07:02
I think the C++ library is pre-built with exceptio
tapted
2017/02/03 23:07:02
Ooh nice! I'm glad we clarify this.
go/cppguide a
|
+ return content_setting_decorations_.at(index)->content_setting_image_model(); |
+} |
+ |
void LocationBarViewMac::SetEditable(bool editable) { |
[field_ setEditable:editable ? YES : NO]; |
UpdateBookmarkStarVisibility(); |