| OLD | NEW |
| 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/omnibox/omnibox_view_views.h" | 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 if (saved_selection_for_focus_change_.IsValid()) { | 715 if (saved_selection_for_focus_change_.IsValid()) { |
| 716 entry_start = saved_selection_for_focus_change_.start(); | 716 entry_start = saved_selection_for_focus_change_.start(); |
| 717 entry_end = saved_selection_for_focus_change_.end(); | 717 entry_end = saved_selection_for_focus_change_.end(); |
| 718 } else { | 718 } else { |
| 719 GetSelectionBounds(&entry_start, &entry_end); | 719 GetSelectionBounds(&entry_start, &entry_end); |
| 720 } | 720 } |
| 721 node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_START, entry_start); | 721 node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_START, entry_start); |
| 722 node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_END, entry_end); | 722 node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_END, entry_end); |
| 723 | 723 |
| 724 if (popup_window_mode_) { | 724 if (popup_window_mode_) { |
| 725 node_data->AddStateFlag(ui::AX_STATE_READ_ONLY); | 725 node_data->AddState(ui::AX_STATE_READ_ONLY); |
| 726 } else { | 726 } else { |
| 727 node_data->AddStateFlag(ui::AX_STATE_EDITABLE); | 727 node_data->AddState(ui::AX_STATE_EDITABLE); |
| 728 } | 728 } |
| 729 } | 729 } |
| 730 | 730 |
| 731 bool OmniboxViewViews::HandleAccessibleAction( | 731 bool OmniboxViewViews::HandleAccessibleAction( |
| 732 const ui::AXActionData& action_data) { | 732 const ui::AXActionData& action_data) { |
| 733 if (read_only()) | 733 if (read_only()) |
| 734 return Textfield::HandleAccessibleAction(action_data); | 734 return Textfield::HandleAccessibleAction(action_data); |
| 735 | 735 |
| 736 if (action_data.action == ui::AX_ACTION_SET_VALUE) { | 736 if (action_data.action == ui::AX_ACTION_SET_VALUE) { |
| 737 SetUserText(action_data.value, true); | 737 SetUserText(action_data.value, true); |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 paste_position + 1, IDS_PASTE_AND_GO, IDS_PASTE_AND_GO); | 1066 paste_position + 1, IDS_PASTE_AND_GO, IDS_PASTE_AND_GO); |
| 1067 | 1067 |
| 1068 menu_contents->AddSeparator(ui::NORMAL_SEPARATOR); | 1068 menu_contents->AddSeparator(ui::NORMAL_SEPARATOR); |
| 1069 | 1069 |
| 1070 // Minor note: We use IDC_ for command id here while the underlying textfield | 1070 // Minor note: We use IDC_ for command id here while the underlying textfield |
| 1071 // is using IDS_ for all its command ids. This is because views cannot depend | 1071 // is using IDS_ for all its command ids. This is because views cannot depend |
| 1072 // on IDC_ for now. | 1072 // on IDC_ for now. |
| 1073 menu_contents->AddItemWithStringId(IDC_EDIT_SEARCH_ENGINES, | 1073 menu_contents->AddItemWithStringId(IDC_EDIT_SEARCH_ENGINES, |
| 1074 IDS_EDIT_SEARCH_ENGINES); | 1074 IDS_EDIT_SEARCH_ENGINES); |
| 1075 } | 1075 } |
| OLD | NEW |