OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/view.h" | 5 #include "views/view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #ifndef NDEBUG | 8 #ifndef NDEBUG |
9 #include <iostream> | 9 #include <iostream> |
10 #endif | 10 #endif |
(...skipping 296 matching lines...) Loading... |
307 return focus_manager->GetFocusedView() == this; | 307 return focus_manager->GetFocusedView() == this; |
308 return false; | 308 return false; |
309 } | 309 } |
310 | 310 |
311 void View::Focus() { | 311 void View::Focus() { |
312 // By default, we clear the native focus. This ensures that no visible native | 312 // By default, we clear the native focus. This ensures that no visible native |
313 // view as the focus and that we still receive keyboard inputs. | 313 // view as the focus and that we still receive keyboard inputs. |
314 FocusManager* focus_manager = GetFocusManager(); | 314 FocusManager* focus_manager = GetFocusManager(); |
315 if (focus_manager) | 315 if (focus_manager) |
316 focus_manager->ClearNativeFocus(); | 316 focus_manager->ClearNativeFocus(); |
| 317 |
| 318 // Notify assistive technologies of the focus change. |
| 319 NotifyAccessibilityEvent(AccessibilityTypes::EVENT_FOCUS); |
| 320 } |
| 321 |
| 322 void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type) { |
| 323 NotifyAccessibilityEvent(event_type, true); |
317 } | 324 } |
318 | 325 |
319 void View::SetHotTracked(bool flag) { | 326 void View::SetHotTracked(bool flag) { |
320 } | 327 } |
321 | 328 |
322 ///////////////////////////////////////////////////////////////////////////// | 329 ///////////////////////////////////////////////////////////////////////////// |
323 // | 330 // |
324 // View - painting | 331 // View - painting |
325 // | 332 // |
326 ///////////////////////////////////////////////////////////////////////////// | 333 ///////////////////////////////////////////////////////////////////////////// |
(...skipping 1186 matching lines...) Loading... |
1513 possible_drag = false; | 1520 possible_drag = false; |
1514 start_pt = gfx::Point(); | 1521 start_pt = gfx::Point(); |
1515 } | 1522 } |
1516 | 1523 |
1517 void View::DragInfo::PossibleDrag(const gfx::Point& p) { | 1524 void View::DragInfo::PossibleDrag(const gfx::Point& p) { |
1518 possible_drag = true; | 1525 possible_drag = true; |
1519 start_pt = p; | 1526 start_pt = p; |
1520 } | 1527 } |
1521 | 1528 |
1522 } // namespace | 1529 } // namespace |
OLD | NEW |