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 22 matching lines...) Expand all Loading... |
33 #include "ui/gfx/screen.h" | 33 #include "ui/gfx/screen.h" |
34 | 34 |
35 namespace aura { | 35 namespace aura { |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 Window* GetParentForWindow(Window* window, Window* suggested_parent) { | 39 Window* GetParentForWindow(Window* window, Window* suggested_parent) { |
40 if (suggested_parent) | 40 if (suggested_parent) |
41 return suggested_parent; | 41 return suggested_parent; |
42 if (client::GetStackingClient()) | 42 if (client::GetStackingClient()) |
43 return client::GetStackingClient()->GetDefaultParent(window, gfx::Rect()); | 43 return client::GetStackingClient()->GetDefaultParent( |
| 44 window, window, gfx::Rect()); |
44 return NULL; | 45 return NULL; |
45 } | 46 } |
46 | 47 |
47 } // namespace | 48 } // namespace |
48 | 49 |
49 Window::TestApi::TestApi(Window* window) : window_(window) {} | 50 Window::TestApi::TestApi(Window* window) : window_(window) {} |
50 | 51 |
51 bool Window::TestApi::OwnsLayer() const { | 52 bool Window::TestApi::OwnsLayer() const { |
52 return !!window_->layer_owner_.get(); | 53 return !!window_->layer_owner_.get(); |
53 } | 54 } |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 bool contains_mouse = false; | 969 bool contains_mouse = false; |
969 if (IsVisible()) { | 970 if (IsVisible()) { |
970 RootWindow* root_window = GetRootWindow(); | 971 RootWindow* root_window = GetRootWindow(); |
971 contains_mouse = root_window && | 972 contains_mouse = root_window && |
972 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); | 973 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); |
973 } | 974 } |
974 return contains_mouse; | 975 return contains_mouse; |
975 } | 976 } |
976 | 977 |
977 } // namespace aura | 978 } // namespace aura |
OLD | NEW |