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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 23441024: Implement put_accvalue for textfields and location bar. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add test, address feedback Created 7 years, 3 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/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 4b2dbd2e88f0ae63b660051489ca93acfe3f9197..a49a20a29d278311abc3479bc907830c8e3ee1b8 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1300,6 +1300,10 @@ void LocationBarView::PaintPageActionBackgrounds(gfx::Canvas* canvas) {
}
}
+void LocationBarView::AccessibilitySetValue(const string16& new_value) {
+ location_entry_->SetUserText(new_value);
+}
+
const char* LocationBarView::GetClassName() const {
return kViewClassName;
}
@@ -1341,6 +1345,9 @@ void LocationBarView::GetAccessibleState(ui::AccessibleViewState* state) {
location_entry_->GetSelectionBounds(&entry_start, &entry_end);
state->selection_start = entry_start;
state->selection_end = entry_end;
+
+ state->set_value_callback =
+ base::Bind(&LocationBarView::AccessibilitySetValue, AsWeakPtr());
}
bool LocationBarView::HasFocus() const {

Powered by Google App Engine
This is Rietveld 408576698