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 b651ddc9385d8e47f4f5d619e558d8c028149f5b..75a87f49facce03e926b959f6ab13bf2776951a1 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,19 @@ bool LocationBarViewMac::GetBookmarkStarVisibility() { |
return star_decoration_->IsVisible(); |
} |
+bool LocationBarViewMac::TestContentSettingImagePressed(size_t index) { |
+ if (index >= content_setting_decorations_.size()) |
Peter Kasting
2017/02/08 01:00:03
Nit: Should this just DCHECK_LT?
kylix_rd
2017/02/10 22:47:48
I don't think so... since it's called by a test, t
|
+ return false; |
+ |
+ // TODO(tapted): Use OnAccessibilityViewAction() here. Currently it's broken. |
+ ContentSettingDecoration* decoration = |
+ content_setting_decorations_[index].get(); |
+ AutocompleteTextFieldCell* cell = [field_ cell]; |
+ NSRect frame = [cell frameForDecoration:decoration inFrame:[field_ bounds]]; |
+ content_setting_decorations_[index]->OnMousePressed(frame, NSZeroPoint); |
Peter Kasting
2017/02/08 01:00:03
Nit: Can this just use |decoration|?
kylix_rd
2017/02/10 22:47:48
Seems like it should. I just lifted this code from
|
+ return true; |
+} |
+ |
void LocationBarViewMac::SetEditable(bool editable) { |
[field_ setEditable:editable ? YES : NO]; |
UpdateBookmarkStarVisibility(); |