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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 196133012: Fix incorrect use of AXState caused when refactoring two enums into one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add dependency Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION); 1131 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION);
1132 state->value = omnibox_view_->GetText(); 1132 state->value = omnibox_view_->GetText();
1133 1133
1134 base::string16::size_type entry_start; 1134 base::string16::size_type entry_start;
1135 base::string16::size_type entry_end; 1135 base::string16::size_type entry_end;
1136 omnibox_view_->GetSelectionBounds(&entry_start, &entry_end); 1136 omnibox_view_->GetSelectionBounds(&entry_start, &entry_end);
1137 state->selection_start = entry_start; 1137 state->selection_start = entry_start;
1138 state->selection_end = entry_end; 1138 state->selection_end = entry_end;
1139 1139
1140 if (is_popup_mode_) { 1140 if (is_popup_mode_) {
1141 state->state |= ui::AX_STATE_READ_ONLY; 1141 state->SetStateFlag(ui::AX_STATE_READ_ONLY);
1142 } else { 1142 } else {
1143 state->set_value_callback = 1143 state->set_value_callback =
1144 base::Bind(&LocationBarView::AccessibilitySetValue, 1144 base::Bind(&LocationBarView::AccessibilitySetValue,
1145 weak_ptr_factory_.GetWeakPtr()); 1145 weak_ptr_factory_.GetWeakPtr());
1146 } 1146 }
1147 } 1147 }
1148 1148
1149 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 1149 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
1150 InstantServiceFactory::GetForProfile(profile())->OnOmniboxStartMarginChanged( 1150 InstantServiceFactory::GetForProfile(profile())->OnOmniboxStartMarginChanged(
1151 bounds().x()); 1151 bounds().x());
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 if (!browser) 1548 if (!browser)
1549 return; // Possible when browser is shutting down. 1549 return; // Possible when browser is shutting down.
1550 1550
1551 FirstRunBubble::ShowBubble(browser, GetLocationBarAnchor()); 1551 FirstRunBubble::ShowBubble(browser, GetLocationBarAnchor());
1552 #endif 1552 #endif
1553 } 1553 }
1554 1554
1555 void LocationBarView::AccessibilitySetValue(const base::string16& new_value) { 1555 void LocationBarView::AccessibilitySetValue(const base::string16& new_value) {
1556 omnibox_view_->SetUserText(new_value, new_value, true); 1556 omnibox_view_->SetUserText(new_value, new_value, true);
1557 } 1557 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698