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

Side by Side Diff: ui/views/controls/combobox/combobox.cc

Issue 13524005: Cleanup: remove NotifyAccessibilityEvent from views::Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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
« no previous file with comments | « ui/views/controls/button/image_button.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/controls/combobox/combobox.h" 5 #include "ui/views/controls/combobox/combobox.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "ui/base/accessibility/accessible_view_state.h" 9 #include "ui/base/accessibility/accessible_view_state.h"
10 #include "ui/base/events/event.h" 10 #include "ui/base/events/event.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void Combobox::SetSelectedIndex(int index) { 51 void Combobox::SetSelectedIndex(int index) {
52 selected_index_ = index; 52 selected_index_ = index;
53 if (native_wrapper_) 53 if (native_wrapper_)
54 native_wrapper_->UpdateSelectedIndex(); 54 native_wrapper_->UpdateSelectedIndex();
55 } 55 }
56 56
57 void Combobox::SelectionChanged() { 57 void Combobox::SelectionChanged() {
58 selected_index_ = native_wrapper_->GetSelectedIndex(); 58 selected_index_ = native_wrapper_->GetSelectedIndex();
59 if (listener_) 59 if (listener_)
60 listener_->OnSelectedIndexChanged(this); 60 listener_->OnSelectedIndexChanged(this);
61 if (GetWidget()) { 61 NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_VALUE_CHANGED, false);
62 GetWidget()->NotifyAccessibilityEvent(
63 this, ui::AccessibilityTypes::EVENT_VALUE_CHANGED, false);
64 }
65 } 62 }
66 63
67 void Combobox::SetAccessibleName(const string16& name) { 64 void Combobox::SetAccessibleName(const string16& name) {
68 accessible_name_ = name; 65 accessible_name_ = name;
69 } 66 }
70 67
71 void Combobox::SetInvalid(bool invalid) { 68 void Combobox::SetInvalid(bool invalid) {
72 invalid_ = invalid; 69 invalid_ = invalid;
73 if (native_wrapper_) 70 if (native_wrapper_)
74 native_wrapper_->ValidityStateChanged(); 71 native_wrapper_->ValidityStateChanged();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 native_wrapper_->UpdateSelectedIndex(); 153 native_wrapper_->UpdateSelectedIndex();
157 native_wrapper_->UpdateEnabled(); 154 native_wrapper_->UpdateEnabled();
158 } 155 }
159 } 156 }
160 157
161 std::string Combobox::GetClassName() const { 158 std::string Combobox::GetClassName() const {
162 return kViewClassName; 159 return kViewClassName;
163 } 160 }
164 161
165 } // namespace views 162 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/image_button.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698