| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/views/focus/view_storage.h" | 5 #include "chrome/views/focus/view_storage.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/stl_util-inl.h" |
| 9 #include "chrome/common/notification_service.h" | 10 #include "chrome/common/notification_service.h" |
| 10 #include "chrome/common/stl_util-inl.h" | |
| 11 | 11 |
| 12 namespace views { | 12 namespace views { |
| 13 | 13 |
| 14 // This struct contains the information to locate a specific view. | 14 // This struct contains the information to locate a specific view. |
| 15 // Locating a view is not always straight-forward as a view can be a floating | 15 // Locating a view is not always straight-forward as a view can be a floating |
| 16 // view, or the child of a floating view. Floating views are frequently deleted | 16 // view, or the child of a floating view. Floating views are frequently deleted |
| 17 // and recreated (typically when their container is laid out). | 17 // and recreated (typically when their container is laid out). |
| 18 struct ViewLocationInfo { | 18 struct ViewLocationInfo { |
| 19 // True if the view is floating or the child of a floating view. False | 19 // True if the view is floating or the child of a floating view. False |
| 20 // otherwise. | 20 // otherwise. |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // That view is not in the view storage. | 179 // That view is not in the view storage. |
| 180 return; | 180 return; |
| 181 } | 181 } |
| 182 | 182 |
| 183 std::vector<int>* ids = ids_iter->second; | 183 std::vector<int>* ids = ids_iter->second; |
| 184 DCHECK(!ids->empty()); | 184 DCHECK(!ids->empty()); |
| 185 EraseView((*ids)[0], true); | 185 EraseView((*ids)[0], true); |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace views | 188 } // namespace views |
| OLD | NEW |