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

Side by Side Diff: ui/views/controls/native/native_view_host.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/message_box_view.cc ('k') | ui/views/controls/native_control.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/native/native_view_host.h" 5 #include "ui/views/controls/native/native_view_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/gfx/canvas.h" 8 #include "ui/gfx/canvas.h"
9 #include "ui/views/controls/native/native_view_host_wrapper.h" 9 #include "ui/views/controls/native/native_view_host_wrapper.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 native_wrapper_->RemovedFromWidget(); 156 native_wrapper_->RemovedFromWidget();
157 } 157 }
158 } 158 }
159 159
160 std::string NativeViewHost::GetClassName() const { 160 std::string NativeViewHost::GetClassName() const {
161 return kViewClassName; 161 return kViewClassName;
162 } 162 }
163 163
164 void NativeViewHost::OnFocus() { 164 void NativeViewHost::OnFocus() {
165 native_wrapper_->SetFocus(); 165 native_wrapper_->SetFocus();
166 GetWidget()->NotifyAccessibilityEvent( 166 NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_FOCUS, true);
167 this, ui::AccessibilityTypes::EVENT_FOCUS, true);
168 } 167 }
169 168
170 gfx::NativeViewAccessible NativeViewHost::GetNativeViewAccessible() { 169 gfx::NativeViewAccessible NativeViewHost::GetNativeViewAccessible() {
171 if (native_wrapper_.get()) { 170 if (native_wrapper_.get()) {
172 gfx::NativeViewAccessible accessible_view = 171 gfx::NativeViewAccessible accessible_view =
173 native_wrapper_->GetNativeViewAccessible(); 172 native_wrapper_->GetNativeViewAccessible();
174 if (accessible_view) 173 if (accessible_view)
175 return accessible_view; 174 return accessible_view;
176 } 175 }
177 176
(...skipping 21 matching lines...) Expand all
199 Widget::GetAllChildWidgets(native_view(), &widgets); 198 Widget::GetAllChildWidgets(native_view(), &widgets);
200 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) { 199 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) {
201 focus_manager->ViewRemoved((*i)->GetRootView()); 200 focus_manager->ViewRemoved((*i)->GetRootView());
202 if (!focus_manager->GetFocusedView()) 201 if (!focus_manager->GetFocusedView())
203 return; 202 return;
204 } 203 }
205 } 204 }
206 205
207 206
208 } // namespace views 207 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/message_box_view.cc ('k') | ui/views/controls/native_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698