Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 2091063002: Location bar: make decorations accessible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: first round Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index f6d97883a0032f8cb26ba55207156d17a7dbfac2..6ccd492136f641a7a346097d78d01d49d90b8847 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -450,6 +450,20 @@ class NotificationBridge : public AppMenuIconController::Delegate {
locationBarView_.reset(new LocationBarViewMac(locationBar_, commands_,
profile_, browser_));
[locationBar_ setFont:[NSFont systemFontOfSize:14]];
+
+ // Add the location bar's accessibility views as direct subviews of the
+ // toolbar. They are logical children of the location bar, but the location
+ // bar's actual Cocoa control is an NSCell, so it cannot have child views.
+ // The |locationBarView_| is responsible for positioning the accessibility
+ // views.
+ std::vector<NSView*> accessibility_views =
+ locationBarView_->GetDecorationAccessibilityViews();
+ for (const auto& view : accessibility_views) {
+ [[self toolbarView] addSubview:view
+ positioned:NSWindowAbove
+ relativeTo:locationBar_];
+ }
+
if (!isModeMaterial) {
[locationBar_ setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
}
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698