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 #ifndef VIEWS_FOCUS_VIEW_STORAGE_H_ | 5 #ifndef UI_VIEWS_FOCUS_VIEW_STORAGE_H_ |
6 #define VIEWS_FOCUS_VIEW_STORAGE_H_ | 6 #define UI_VIEWS_FOCUS_VIEW_STORAGE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "views/view.h" | 10 #include "views/view.h" |
11 | 11 |
12 // This class is a simple storage place for storing/retrieving views. It is | 12 // This class is a simple storage place for storing/retrieving views. It is |
13 // used for example in the FocusManager to store/restore focused views when the | 13 // used for example in the FocusManager to store/restore focused views when the |
14 // main window becomes active/inactive. | 14 // main window becomes active/inactive. |
15 // It automatically removes a view from the storage if the view is removed from | 15 // It automatically removes a view from the storage if the view is removed from |
16 // the tree hierarchy. | 16 // the tree hierarchy. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 std::map<int, View*> id_to_view_; | 60 std::map<int, View*> id_to_view_; |
61 | 61 |
62 // Association View to id, used to speed up view notification removal. | 62 // Association View to id, used to speed up view notification removal. |
63 std::map<View*, std::vector<int>*> view_to_ids_; | 63 std::map<View*, std::vector<int>*> view_to_ids_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(ViewStorage); | 65 DISALLOW_COPY_AND_ASSIGN(ViewStorage); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace views | 68 } // namespace views |
69 | 69 |
70 #endif // VIEWS_FOCUS_VIEW_STORAGE_H_ | 70 #endif // UI_VIEWS_FOCUS_VIEW_STORAGE_H_ |
OLD | NEW |