| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/focus/focus_manager.h" | 5 #include "ui/views/focus/focus_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 (*iter)->NativeFocusWillChange(focused_before, focused_now); | 94 (*iter)->NativeFocusWillChange(focused_before, focused_now); |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 | 97 |
| 98 // static | 98 // static |
| 99 FocusManager::WidgetFocusManager* | 99 FocusManager::WidgetFocusManager* |
| 100 FocusManager::WidgetFocusManager::GetInstance() { | 100 FocusManager::WidgetFocusManager::GetInstance() { |
| 101 return Singleton<WidgetFocusManager>::get(); | 101 return Singleton<WidgetFocusManager>::get(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 FocusManager::WidgetFocusManager::WidgetFocusManager() : enabled_(true) {} |
| 105 |
| 106 FocusManager::WidgetFocusManager::~WidgetFocusManager() {} |
| 107 |
| 104 //////////////////////////////////////////////////////////////////////////////// | 108 //////////////////////////////////////////////////////////////////////////////// |
| 105 // FocusManager, public: | 109 // FocusManager, public: |
| 106 | 110 |
| 107 FocusManager::FocusManager(Widget* widget) | 111 FocusManager::FocusManager(Widget* widget) |
| 108 : widget_(widget), | 112 : widget_(widget), |
| 109 focused_view_(NULL) { | 113 focused_view_(NULL) { |
| 110 DCHECK(widget_); | 114 DCHECK(widget_); |
| 111 } | 115 } |
| 112 | 116 |
| 113 FocusManager::~FocusManager() { | 117 FocusManager::~FocusManager() { |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 !IsTraverseForward(direction), | 468 !IsTraverseForward(direction), |
| 465 FocusSearch::DOWN, | 469 FocusSearch::DOWN, |
| 466 false, | 470 false, |
| 467 &new_focus_traversable, | 471 &new_focus_traversable, |
| 468 &new_starting_view); | 472 &new_starting_view); |
| 469 } | 473 } |
| 470 return v; | 474 return v; |
| 471 } | 475 } |
| 472 | 476 |
| 473 } // namespace ui | 477 } // namespace ui |
| OLD | NEW |