OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/aura/window.h" | 5 #include "ui/aura/window.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 DISALLOW_COPY_AND_ASSIGN(ScopedCursorHider); | 83 DISALLOW_COPY_AND_ASSIGN(ScopedCursorHider); |
84 }; | 84 }; |
85 | 85 |
86 Window::Window(WindowDelegate* delegate) | 86 Window::Window(WindowDelegate* delegate) |
87 : host_(NULL), | 87 : host_(NULL), |
88 type_(ui::wm::WINDOW_TYPE_UNKNOWN), | 88 type_(ui::wm::WINDOW_TYPE_UNKNOWN), |
89 owned_by_parent_(true), | 89 owned_by_parent_(true), |
90 delegate_(delegate), | 90 delegate_(delegate), |
91 parent_(NULL), | 91 parent_(NULL), |
92 visible_(false), | 92 visible_(false), |
93 id_(-1), | 93 id_(kInitialId), |
94 transparent_(false), | 94 transparent_(false), |
95 user_data_(NULL), | 95 user_data_(NULL), |
96 ignore_events_(false), | 96 ignore_events_(false), |
97 // Don't notify newly added observers during notification. This causes | 97 // Don't notify newly added observers during notification. This causes |
98 // problems for code that adds an observer as part of an observer | 98 // problems for code that adds an observer as part of an observer |
99 // notification (such as the workspace code). | 99 // notification (such as the workspace code). |
100 observers_(base::ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY) { | 100 observers_(base::ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY) { |
101 SetTargetHandler(delegate_); | 101 SetTargetHandler(delegate_); |
102 } | 102 } |
103 | 103 |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 layer_name = "Unnamed Window"; | 1116 layer_name = "Unnamed Window"; |
1117 | 1117 |
1118 if (id_ != -1) | 1118 if (id_ != -1) |
1119 layer_name += " " + base::IntToString(id_); | 1119 layer_name += " " + base::IntToString(id_); |
1120 | 1120 |
1121 layer()->set_name(layer_name); | 1121 layer()->set_name(layer_name); |
1122 #endif | 1122 #endif |
1123 } | 1123 } |
1124 | 1124 |
1125 } // namespace aura | 1125 } // namespace aura |
OLD | NEW |