Chromium Code Reviews| 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..36317632bf741c484039f6d5c5b32745b7929818 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,11 @@ void LocationBarView::PaintPageActionBackgrounds(gfx::Canvas* canvas) { |
| } |
| } |
| +void LocationBarView::AccessibilitySetValue(const string16& new_value) { |
| + location_entry_->SetUserText(new_value); |
| + location_entry_->SelectAll(false); |
|
msw
2013/08/31 20:22:36
This does not clear the selection as the Accessibi
dmazzoni
2013/09/03 20:20:11
Done.
|
| +} |
| + |
| const char* LocationBarView::GetClassName() const { |
| return kViewClassName; |
| } |
| @@ -1341,6 +1346,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, base::Unretained(this)); |
|
msw
2013/08/31 20:22:36
base::Unretained is probably not correct here, I t
dmazzoni
2013/09/03 20:20:11
I don't think we need to bind to location_entry_,
msw
2013/09/03 21:06:57
Binding to a LocationBarView WeakPtr is just as go
|
| } |
| bool LocationBarView::HasFocus() const { |