| 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/external_focus_tracker.h" | 5 #include "ui/views/focus/external_focus_tracker.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/views/focus/view_storage.h" | 8 #include "ui/views/focus/view_storage.h" |
| 9 #include "views/view.h" | 9 #include "ui/views/view.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 | 12 |
| 13 ExternalFocusTracker::ExternalFocusTracker(View* parent_view, | 13 ExternalFocusTracker::ExternalFocusTracker(View* parent_view, |
| 14 FocusManager* focus_manager) | 14 FocusManager* focus_manager) |
| 15 : focus_manager_(focus_manager), | 15 : focus_manager_(focus_manager), |
| 16 parent_view_(parent_view) { | 16 parent_view_(parent_view) { |
| 17 DCHECK(focus_manager); | 17 DCHECK(focus_manager); |
| 18 DCHECK(parent_view); | 18 DCHECK(parent_view); |
| 19 view_storage_ = ViewStorage::GetInstance(); | 19 view_storage_ = ViewStorage::GetInstance(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 if (view != NULL) | 63 if (view != NULL) |
| 64 view_storage_->StoreView(last_focused_view_storage_id_, view); | 64 view_storage_->StoreView(last_focused_view_storage_id_, view); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void ExternalFocusTracker::StartTracking() { | 67 void ExternalFocusTracker::StartTracking() { |
| 68 StoreLastFocusedView(focus_manager_->GetFocusedView()); | 68 StoreLastFocusedView(focus_manager_->GetFocusedView()); |
| 69 focus_manager_->AddFocusChangeListener(this); | 69 focus_manager_->AddFocusChangeListener(this); |
| 70 } | 70 } |
| 71 | 71 |
| 72 } // namespace views | 72 } // namespace views |
| OLD | NEW |