| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 parent_(NULL), | 63 parent_(NULL), |
| 64 transient_parent_(NULL), | 64 transient_parent_(NULL), |
| 65 visible_(false), | 65 visible_(false), |
| 66 id_(-1), | 66 id_(-1), |
| 67 transparent_(false), | 67 transparent_(false), |
| 68 user_data_(NULL), | 68 user_data_(NULL), |
| 69 ignore_events_(false), | 69 ignore_events_(false), |
| 70 // Don't notify newly added observers during notification. This causes | 70 // Don't notify newly added observers during notification. This causes |
| 71 // problems for code that adds an observer as part of an observer | 71 // problems for code that adds an observer as part of an observer |
| 72 // notification (such as the workspace code). | 72 // notification (such as the workspace code). |
| 73 observers_(ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY) { | 73 observers_(ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY), |
| 74 is_constrained_window_(false) { |
| 74 set_target_handler(delegate_); | 75 set_target_handler(delegate_); |
| 75 } | 76 } |
| 76 | 77 |
| 77 Window::~Window() { | 78 Window::~Window() { |
| 78 // layer_ can be NULL if Init() wasn't invoked, which can happen | 79 // layer_ can be NULL if Init() wasn't invoked, which can happen |
| 79 // only in tests. | 80 // only in tests. |
| 80 if (layer_) | 81 if (layer_) |
| 81 layer_->SuppressPaint(); | 82 layer_->SuppressPaint(); |
| 82 | 83 |
| 83 // Let the delegate know we're in the processing of destroying. | 84 // Let the delegate know we're in the processing of destroying. |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 bool contains_mouse = false; | 970 bool contains_mouse = false; |
| 970 if (IsVisible()) { | 971 if (IsVisible()) { |
| 971 RootWindow* root_window = GetRootWindow(); | 972 RootWindow* root_window = GetRootWindow(); |
| 972 contains_mouse = root_window && | 973 contains_mouse = root_window && |
| 973 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); | 974 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); |
| 974 } | 975 } |
| 975 return contains_mouse; | 976 return contains_mouse; |
| 976 } | 977 } |
| 977 | 978 |
| 978 } // namespace aura | 979 } // namespace aura |
| OLD | NEW |