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

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: Rename SetStateFlag -> AddStateFlag 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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION); 1133 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION);
1134 state->value = omnibox_view_->GetText(); 1134 state->value = omnibox_view_->GetText();
1135 1135
1136 base::string16::size_type entry_start; 1136 base::string16::size_type entry_start;
1137 base::string16::size_type entry_end; 1137 base::string16::size_type entry_end;
1138 omnibox_view_->GetSelectionBounds(&entry_start, &entry_end); 1138 omnibox_view_->GetSelectionBounds(&entry_start, &entry_end);
1139 state->selection_start = entry_start; 1139 state->selection_start = entry_start;
1140 state->selection_end = entry_end; 1140 state->selection_end = entry_end;
1141 1141
1142 if (is_popup_mode_) { 1142 if (is_popup_mode_) {
1143 state->state |= ui::AX_STATE_READ_ONLY; 1143 state->AddStateFlag(ui::AX_STATE_READ_ONLY);
1144 } else { 1144 } else {
1145 state->set_value_callback = 1145 state->set_value_callback =
1146 base::Bind(&LocationBarView::AccessibilitySetValue, 1146 base::Bind(&LocationBarView::AccessibilitySetValue,
1147 weak_ptr_factory_.GetWeakPtr()); 1147 weak_ptr_factory_.GetWeakPtr());
1148 } 1148 }
1149 } 1149 }
1150 1150
1151 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 1151 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
1152 InstantServiceFactory::GetForProfile(profile())->OnOmniboxStartMarginChanged( 1152 InstantServiceFactory::GetForProfile(profile())->OnOmniboxStartMarginChanged(
1153 bounds().x()); 1153 bounds().x());
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 if (!browser) 1550 if (!browser)
1551 return; // Possible when browser is shutting down. 1551 return; // Possible when browser is shutting down.
1552 1552
1553 FirstRunBubble::ShowBubble(browser, GetLocationBarAnchor()); 1553 FirstRunBubble::ShowBubble(browser, GetLocationBarAnchor());
1554 #endif 1554 #endif
1555 } 1555 }
1556 1556
1557 void LocationBarView::AccessibilitySetValue(const base::string16& new_value) { 1557 void LocationBarView::AccessibilitySetValue(const base::string16& new_value) {
1558 omnibox_view_->SetUserText(new_value, new_value, true); 1558 omnibox_view_->SetUserText(new_value, new_value, true);
1559 } 1559 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698