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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h

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
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
index 651a099d67569a1ff6d7c27a07f9fa6df75edcbc..345eb2a1996b26736fa905d9c7e35a804ccce483 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
@@ -201,6 +201,11 @@ class LocationBarViewMac : public LocationBar,
// Updates the view for the zoom icon when default zoom levels change.
void OnDefaultZoomLevelChanged() override;
+ // Returns the decoration accessibility views for all of this
+ // LocationBarViewMac's decorations. The returned NSViews may not have been
+ // positioned yet.
+ std::vector<NSView*> GetDecorationAccessibilityViews();
+
private:
friend ZoomDecorationTest;
@@ -238,6 +243,15 @@ class LocationBarViewMac : public LocationBar,
// Returns whether any updates were made.
bool UpdateZoomDecoration(bool default_zoom_changed);
+ // Returns pointers to all of the LocationBarDecorations owned by this
+ // LocationBarViewMac. This helper function is used for positioning and
+ // re-positioning accessibility views.
+ std::vector<LocationBarDecoration*> GetDecorations();
+
+ // Updates |decoration|'s accessibility view's position to match the computed
+ // position the decoration will be drawn at.
+ void UpdateAccessibilityViewPosition(LocationBarDecoration* decoration);
+
std::unique_ptr<OmniboxViewMac> omnibox_view_;
AutocompleteTextField* field_; // owned by tab controller

Powered by Google App Engine
This is Rietveld 408576698